Need some help with my level 2 left side navigation

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
TheDoctor
New Member
New Member
Posts: 4
Joined: Sat Jan 01, 2011 3:03 am

Need some help with my level 2 left side navigation

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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...
TheDoctor
New Member
New Member
Posts: 4
Joined: Sat Jan 01, 2011 3:03 am

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

Post 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.
TheDoctor
New Member
New Member
Posts: 4
Joined: Sat Jan 01, 2011 3:03 am

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

Post by TheDoctor »

I just used the CSS tag text-transform: capitalize; and it worked perfectly!

Thanks again Dr.CSS!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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...
Post Reply

Return to “CMSMS Core”