Page 1 of 1
Navigation question/problem
Posted: Tue Apr 17, 2007 10:56 am
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!
Re: Navigation question/problem
Posted: Tue Apr 17, 2007 11:43 am
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.
Re: Navigation question/problem
Posted: Tue Apr 17, 2007 11:46 am
by jd
sorry, but where these menu tags come from?
Re: Navigation question/problem
Posted: Tue Apr 17, 2007 12:27 pm
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.
Re: Navigation question/problem
Posted: Tue Apr 17, 2007 1:02 pm
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!
Re: Navigation question/problem
Posted: Tue Apr 17, 2007 2:58 pm
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.
Re: Navigation question/problem
Posted: Wed Apr 18, 2007 7:38 pm
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...
Re: Navigation question/problem
Posted: Mon Apr 23, 2007 8:15 am
by jd
10x guys, it worked!
