The image verification code you entered is incorrect.

Display something between node teasers in a view

Work in progess....

Drupal snippet to display something every X node in a view:

1) In the file views.module:

function theme_views_view_nodes($view, $nodes, $teasers = false, $links = true) {
$num_nodes = 0;
$display_at = X;
foreach ($nodes as $n) {
$node = node_load($n->nid);
$output .= node_view($node, $teasers, false, $links);
if (++$num_nodes == $display_at) {
$output .= "test";
$num_nodes = 0;
}
}
return $output;
}



Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
More information about formatting options Captcha Image: you will need to recognize the text in it.
Please type in the letters/numbers that are shown in the image above.