Добавьте в файл template.php:
function phptemplate_links($links, $attributes = array()) {
return _phptemplate_callback('links', array('links' => $links, 'attributes' => $attributes));
}
Создайте файл links.php.tpl и вставьте в него следующий код:
<?php
/**
* to change the delimiter, just modify the $delimiter value
* Add in other fixed links to the link array by adding something like
* $links[] = l('link text', 'link path');
*
*/
$delimiter = " | ";
$link_count = count($links);
$current = 1;
foreach ( $links as $lnk ) {
($lnk['href']) ? print(l($lnk['title'], $lnk['href'], $lnk['attributes'])) : print(t($lnk['title']));
// Only print the delimiter if not the last link
if ( $current < $link_count ) {
print $delimiter;
}
$current++;
}
Комментарии
Thanks!