Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
In any other theme I would use the following code in node.tpl.php, but as a matter of fact there is no such a file as node.tpl.php in Tapestry. Adding such a file does not effect anything. Can you please advice where exactly I need to modify in order to put previous, next links for image pages?
<div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
<?php if ($picture) {
print $picture;
}?>
<?php if ($page == 0) { ?><h2 class="title"> <a href="<?php print $node_url?>"><strong><?php print $title?></strong></a></h2><?php }; ?>
<?=$terms? '<span class="taxonomy">Рубрика: '.$terms.'</span>' : ''?>
<?php
if($page!=0&& $node->type=='image')
{
$previous_node_link = next_prev($node->nid, $node->type, 'prev', t('previous'), '', NULL);
$next_node_link = next_prev($node->nid, $node->type, 'next', t('next'), NULL, '');
print '<div class="previous-next-links" align="center">';
if($previous_node_link && $next_node_link)
{
print $next_node_link.' | '.$previous_node_link;
}
else if($previous_node_link)
{
print $previous_node_link;
}
else if($next_node_link)
{
print $next_node_link;
}
print '</div>';
}
?>
<div class="content" <?php if($page!=0&& $node->type=='image') { echo 'align="center"'; }?>><?php print $content?></div>
<?php if ($links) { ?><div class="links">» <?php print $submitted?> <?php print $links?></div><?php }; ?>
</div>
Comments
Comment #1
yngens CreditAttribution: yngens commentedwrong alert. it works, i needed to refresh the window. sorry.