Page 1 of 1

RubyX How Do I Configure The Tabs?

Posted: Mon Dec 10, 2007 4:04 am
by misspick
I'm totally lost. I believe I set up the first section correctly. Can someone tell me how to set up the second section? I'm sure that once you tell me, I'm gonna think how silly it was that I had to ask, but right now, I'm drawing a blank and I know absolutely nothing about PHP.

Code: Select all

<ul>
{if $head_version < 1.1}
					<li id="active"><a href="#">Recent Entries<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li><a href="http://www.misspick.com/index.php?/categories/1-Recipes">Recipes<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li><a href="#">Site Reviews<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li><a href="http://www.misspick.com/index.php?/categories/9-Favorites">Favorite Things<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li><a href="http://www.misspick.com/index.php?/categories/5-Articles">Articles<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li><a href="http://www.misspick.com/index.php?/categories/10-Journal">Journal<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li><a href="http://www.misspick.com/index.php?/categories/7-Assessment">Self Assessment<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li><a href="http://www.misspick.com/index.php?/wpages/links.html">Links<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li><a href="http://www.misspick.com/index.php?/categories/8-Reviews">Links<span class="tab-l"></span><span class="tab-r"></span></a></li>
{else}
					<li{if $staticpage_pagetitle == ""} id="active"{/if}><a href="{$serendipityBaseURL}" title="Home">Home<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li{if $staticpage_pagetitle == $template_option.navlink1text} id="active"{/if}><a href="{$template_option.navlink1url}" title="{$template_option.navlink1text}">{$template_option.navlink1text}<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li{if $staticpage_pagetitle == $template_option.navlink2text} id="active"{/if}><a href="{$template_option.navlink2url}" title="{$template_option.navlink2text}">{$template_option.navlink2text}<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li{if $staticpage_pagetitle == $template_option.navlink3text} id="active"{/if}><a href="{$template_option.navlink3url}" title="{$template_option.navlink3text}">{$template_option.navlink3text}<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li{if $staticpage_pagetitle == $template_option.navlink4text} id="active"{/if}><a href="{$template_option.navlink4url}" title="{$template_option.navlink4text}">{$template_option.navlink4text}<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li{if $staticpage_pagetitle == $template_option.navlink5text} id="active"{/if}><a href="{$template_option.navlink5url}" title="{$template_option.navlink5text}">{$template_option.navlink5text}<span class="tab-l"></span><span class="tab-r"></span></a></li>
{/if}
				</ul>

Re: RubyX How Do I Configure The Tabs?

Posted: Mon Dec 10, 2007 11:38 am
by garvinhicking
Hi!

It would help if you describe, what you're trying to do? I'm drawing a blank to figure out, what you want or trying to do. :-)

Regards,
Garvin

I'll try to be clearer

Posted: Mon Dec 10, 2007 1:18 pm
by misspick
:oops: For example,

Code: Select all

$template_option.navlink2text
I'm not sure if I'm supposed to put an equal sign after that and Identify the text or replace it with the actual link, I'm not sure if the text link is the name of the link or the link it's self.

I think I really just need to see an example of the code below filled out properly. You don't even have to use my information, you can use generic information if you'd like. I just need to see what I'm supposed to put where because I'm clueless. I don't understand the terms.

Code: Select all

   <li{if $staticpage_pagetitle == $template_option.navlink2text} id="active"{/if}><a href="{$template_option.navlink2url}" title="{$template_option.navlink2text}">{$template_option.navlink2text}<span class="tab-l"></span><span class="tab-r"></span></a></li> 

Re: I'll try to be clearer

Posted: Mon Dec 10, 2007 3:06 pm
by garvinhicking
Please, you still have not written what you want to do!

Okay!

Posted: Mon Dec 10, 2007 4:09 pm
by misspick
I think I really just need to see an example of the code below filled out properly. What goes where?

I can't think of anything that would make what I need clearer.
I've got the links tied to the proper tabs, but when I go to the tabs, the highlighted link remains the first one instead of the tab of whatever page I'm on. I need to configure the code so that the proper tab for the proper page is highlighted.

Thanks so much for your patience! :oops: .

Re: Okay!

Posted: Mon Dec 10, 2007 4:44 pm
by garvinhicking
Hi!

I think I am getting a glimpse of what you want to do:

You want to highlight the Tab of the page you are currently visiting.

Is that right? Because if it is, you didn't say that. :-)

In your section, the first thing until the {else} comes is only if you're using Serendipity smaller than 1.1. When you're using Serendipity 1.2, the first half of your code doesn't get executed anylonger, so you need to focus on the second half.

Which URLs and navigation URLs did you enter in your template's configuration screen? There should be config items like "First nav item", "Second nav item" and so on.

Regards,
Garvin

Thanks so much!

Posted: Wed Dec 12, 2007 6:26 pm
by misspick
I have no idea why I didn't look at the config (hello!) page first. Once I saw that page, I understood exactly what was going on. Unfortunately, because I am using the older version of Serendipity, it was using the if statement instead of the else and it still wasn't highlighting the proper tabs. So I just decided to use a different layout which I'm quite happy with! :D