Overriding the delimiter (the character that separates links) in primary/secondary links
Task · override menu link delimiter · theme menus · theme primary links · theme secondary links · Themers · Drupal 4.6.x
Last modified: August 26, 2009 - 22:43
Description
This snippet is useful if you just want to override the default delimiter character on primary/secondary links. The delimiter is the character that seperates links.
For example: HOME ¦ NEWS ¦ SEARCH ¦ CONTACT.
Where delimiter = ¦
Notes
- For use within your page.tpl.php file.
- Change the $link_delimiter value to what you want
- Please discuss or suggest tips at this thread on the forum discussing how to customise primary/secondary links
<div id="navigation">
<?php if ($links['primary']) : ?>
<ul id="main-nav">
<?php
$link_delimiter = '|'; // Change this to what you want the links seperated by
$delimiter = '</li>' . $link_delimiter . '<li>';
print '</li>' . implode($delimiter, $links['primary']) . '</li>';
?>
</ul>
<?php endif; ?>
</div>