Page 1 of 1

Need some help with my level 2 left side navigation

Posted: Tue Feb 15, 2011 6:06 pm
by TheDoctor
I am having trouble getting the title of the section/category to display on the level 2 left side navigation.

If you go the first page in of the section/category (located here) you will notice that title of level 2 side navigation displays Information. However if you go to the history page, the title changes to History; but I want the title to display the section/category (in this case Information).

This is how I am calling the menu template:

Code: Select all

{menu template="Side Bar Navigation Title" start_level="1" collapse="2"}
This is my menu template:

Code: Select all

{if $count > 0}
	{foreach from=$nodelist item=node}
		{if $node->current == true}
			{$node->menutext}
		{/if}
	{/foreach}
{/if}
I've tried calling the template as:

Code: Select all

{menu template="Side Bar Navigation Title" number_of_levels="1"}
But if I use the above call statement, then the title is only displayed on one root Information page, and nothing is displayed on the History page

CMSMS: 1.9.3
PHP: 5.2.17
MySQL: 5.0.45
Linux

Re: Need some help with my level 2 left side navigation

Posted: Tue Feb 15, 2011 6:16 pm
by Dr.CSS
Looks like you are using the {title} tag, it pulls the title of the page you are on, you need to install CGSimpleSmarty, it has root page title code in the Help...

Re: Need some help with my level 2 left side navigation

Posted: Tue Feb 15, 2011 8:27 pm
by TheDoctor
Thanks Dr.CSS! The {$cgsimple->get_root_alias()} tag in from the CGSimpleSmarty mod worked almost perfectly. The only problem is that the first letter in the root alias is not capitalized. How I could just capitalize the first letter in root's page alias, but then it will be capitalized in the URL, which looks ugly.

Now a better solution would be to convert the root alias to a string then capitalize the first letter of the root alias. I just have no clue on how to do that.

[Solved] Need some help with my level 2 left side navigation

Posted: Wed Feb 16, 2011 4:04 pm
by TheDoctor
I just used the CSS tag text-transform: capitalize; and it worked perfectly!

Thanks again Dr.CSS!

Re: Need some help with my level 2 left side navigation

Posted: Wed Feb 16, 2011 8:11 pm
by Dr.CSS
There is also code in the Help to get the root page Title which is what you may actually be looking for...