Navigation question/problem

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.
Locked
jd

Navigation question/problem

Post by jd »

Hi,
I have the following question. In a website I'm using global content blocks for the navigation. I use something like this:

Code: Select all

<div id="subnav">
<ul>
<li>{cms_selflink page='who' text='Who we are'}</li>
<li>{cms_selflink page='what' text='What we do'}</li>
<li>{cms_selflink page='contact' text='Contact'}</li>
</ul>
</div>
Everything is fine, but I still want to add something extra to this navigation. If there some way, that when for example I have opened a page (let's say the "who" page), the cms_selflink for this page in the navigation is made bold?

Thanks in advance!
Pierre M.

Re: Navigation question/problem

Post by Pierre M. »

Hello !

I don't want to be rude, but I think you are reinventing the wheel. The menu tags make all you want automatically (with tag attributes like {menu collapse='1'} and associated stylesheets). This is the power of a CMS to empower your content hierarchy without you having to care about it. See the doc of the menu tag in the admin.
And have fun.

Pierre M.
jd

Re: Navigation question/problem

Post by jd »

sorry, but where these menu tags come from?
Pierre M.

Re: Navigation question/problem

Post by Pierre M. »

The {menu}, {title} etc tags are in the templates of the pages. Log in the admin, go to layout/templates, you will see {menu} makes all you want. See the attributes (start=, collapse=...) in the help of menu manager in the admin.
You should install CMSms with sample content to discover the tutorial.
Pierre M.
jd

Re: Navigation question/problem

Post by jd »

10x. I looked around and found it. Sorry for asking again, but I can't manage it by myself :(

I use this

Code: Select all

{menu template='test' collapse='0' start_element="2.1.1" number_of_levels="1" show_root_siblings="1" }
but still how can I make let's page 2.1.2 bold when I open it?

The template is the minimal_menu.tpl from the default templates from the Menu Manager.

10x in advance!
Pierre M.

Re: Navigation question/problem

Post by Pierre M. »

I think this is CSS tuning : the {menu} tag should (but does it?) place a class/id on the current item and the CSS should bold/grey/whatyouwant the class/id. Look the drop down CSS/ellnav menu in the sample content. I'm confident you can find the class/id (view HTML source) and modify the CSS to your needs.
Pierre M.
PS : use ' rather than " in attributes.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Navigation question/problem

Post by Dr.CSS »

You will have to have the template 'test' in the Layout » Menu Manager Database Templates tab and in it you will need the calls for currentpage etc. to get the class or id for it to work in the CSS, most times I just use the Import Template to Database button on the right, in the File Template tab, for one of the default menu templates then change/modify/rework it till it does what I need, my site has about 37 of them...
jd

Re: Navigation question/problem

Post by jd »

10x guys, it worked!  :)
Locked

Return to “CMSMS Core”