A lot of the themes for phptemplate only have one set of links (usually the primary links). I know that the SpreadFireFox theme as well as the Marvin_2k theme only allow for one set of links.
I spent a little time today and figured a way to combine primary and secondary links in a fun way. I wanted my primary and secondary links to be on the same row, but simply aligned to different edges of the screen.
I first opened page.tpl.php and found where primary links were rendered. This is what I found.
<?php if (is_array($primary_links)): ?>
<ul id="main-nav">
<?php foreach ($primary_links as $link): ?>
<li><?php print $link?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
I changed it to this:
<?php if (is_array($primary_links)): ?>
<ul id="main-nav">
<?php foreach ($primary_links as $link): ?>
<li><?php print $link?></li>
<?php endforeach; ?>
<?php if (is_array($secondary_links)): ?>
<?php foreach ($secondary_links as $link): ?>
<li2><?php print $link?></li2>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<?php endif; ?>
By making this change I added a condition that checked for secondary links, and if they existed, they were printed under the div tag "
," which is a new tag I created.
The
tag is exactly the same as the
tag except it says, "float: right;" instead of "float: left;"
the result can be seen here: http://72.9.242.6 (don't judge the site, it's still under heavy development).
I hope this can help someone else in the future.
Mateo