News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Need help editing SSI output style

Started by GE_Strider, October 17, 2009, 06:50:10 PM

Previous topic - Next topic

GE_Strider

EDIT: I've figured out how to edit the output style for the ssi_boardNews(); function. But it doesn't seem to work the same for the ssi_menubar(); function. Here's the code for the Navigation menu:

<!-- Navigation -->
<h2><img src="./images/headings/navigation.jpg" alt="Navigation" /></h2>
<ol class="side_list">
<li><?php ssi_menubar(); ?></li>

</ol>


What I'm wanting to do is wrap each section of the navigation menu with the <li></li> tags. But when I do it this way, it displays the links as follows. Please help.

Aleksi "Lex" Kilpinen

Moved this from 1.1 support to coding discussion, where this may get better responses.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Arantor

This is because ssi_menubar issues its own HTML instead, and with the code you have, it puts the entire menu into a single <li> item (with its own items inside)

If you want to do this yourself, you'll need to use something like the following:

<!-- Navigation -->
<h2><img src="./images/headings/navigation.jpg" alt="Navigation" /></h2>
<ol class="side_list">
<?php
foreach($context['menu_buttons'] as $button) {
 if(
$button['show'])
   echo
' <li><a href="', $button['href'], '">', $button['title'], '</a></li>
'
;
}
?>

</ol>
Holder of controversial views, all of which my own.


Advertisement: