is {$node->current} working in simple menu

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
userwords
Forum Members
Forum Members
Posts: 48
Joined: Mon Dec 27, 2010 12:27 am

is {$node->current} working in simple menu

Post by userwords »

because this is not working for me

{elseif $node->current == true}
<li class="currentpage"><h3><span>{$node->menutext}</span></h3>

Im modifing this menu and need the current css class but it is not working.

ive put a paragraph to see what value has and shows a number 1 on the current page.

but neither this

{elseif $node->current == true}

nor this

{elseif $node->current == '1'}

works

Ive tried with {$node->parent} to see if it works the same and this one dont give any value even in a paragraph although in the menu the class parent seems working.

Could you explain me what is this all this about.
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm
Location: OH, USA

Re: is {$node->current} working in simple menu

Post by JohnnyB »

I don't recall having a problem with it. Just tested successfully on CMSMS 1.11.9 with

Code: Select all

{if $node->current == true} class="current"{/if}
What version are you using and can you paste the entire menu template?
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Post Reply

Return to “CMSMS Core”