TinyPortal

Development => Support => Topic started by: lebisol on January 14, 2008, 04:39:25 PM

Title: Using ordered list for main menu?
Post by: lebisol on January 14, 2008, 04:39:25 PM
Hello everyone,
I am experimenting using ordered list for my "main nav" to be used along with tables based tabs provided.
Versions irrelevant but running on most currnent. .14 and .98
I am having issue assigning the correct object ID to list when on particular action page.
What I have so far is:
if ($current_action =='forum')
{echo '<li id="current"><a' , $current_action=='forum' ? '' : '' , ' href="', $scripturl, '?action=forum"><span>' , $txt['tp-forum'] , '</span></a>';}

} else {echo '<li><a' , $current_action=='forum' ? ' ' : '' , ' href="', $scripturl, '?action=forum"><span>' , $txt['tp-forum'] , '</span></a>';}


the error I am getting is:
QuoteIt seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

Utimately I am trying to achive the look simmilar to "BZ13" theme here....
Many thanks for pointers!
Title: Re: Using ordered list for main menu?
Post by: lebisol on January 14, 2008, 05:33:54 PM
Come to think of it...there really is no need to "force lists" since tables system is already in place.
Thanks for listening!
Title: Re: Using ordered list for main menu?
Post by: IchBin on January 15, 2008, 03:01:38 AM
MY EYES!!! the code.... its ..... ugly.... ;) :2funny:
You had one too many brackets. Brackets aren't really required if you're only executing one echo statement for the if and else.
if ($current_action =='forum')
echo '<li id="current"><a' , $current_action=='forum' ? '' : '' , ' href="', $scripturl, '?action=forum"><span>' , $txt['tp-forum'] , '</span></a>';

else
echo '<li><a' , $current_action=='forum' ? ' ' : '' , ' href="', $scripturl, '?action=forum"><span>' , $txt['tp-forum'] , '</span></a>';
Title: Re: Using ordered list for main menu?
Post by: lebisol on January 15, 2008, 08:39:05 AM
lol, yeah well you know...happens when you butcher the code :)
I ended up using tables  (http://mostarnetworks.com/demo/index.php?action=forum;theme=6) for tabs but this would cut down on lot of css, images as well that table holding tab structure...hmmm...just as I thought I was done. :D
Thanks IchBin!