Page 1 of 2

[ Resolved ] Menu title in two lines

Posted: Tue Dec 23, 2008 11:01 pm
by Mikk
Hi all

Is it possible to create a menu title in two lines ?
example :

"Our Products"

..but if I write that , the will appear on the menu.

is there any solution ?
Thanks for help
Mikk

Re: Menu title in two lines

Posted: Tue Dec 23, 2008 11:03 pm
by JeremyBASS
\n ?

Re: Menu title in two lines

Posted: Tue Dec 23, 2008 11:10 pm
by Mikk
hi, thanks for helping, but unfortunately " \n"  will also show on the menu...just tried it.
any other idea ?

thanx
Mikk

Re: Menu title in two lines

Posted: Tue Dec 23, 2008 11:12 pm
by JeremyBASS
no I also tried all kinds of combos...

'.'\n'.'
/\n
'/\n'

I but for every escape I did the script escapes that... ... don't know with out going deeper...

Re: Menu title in two lines

Posted: Tue Dec 23, 2008 11:15 pm
by Mikk
thanks for trying to help though ;)

did someone already succeeded in doing a in a menu title ?
thanks

Re: Menu title in two lines

Posted: Wed Dec 24, 2008 2:10 am
by calguy1000
this is simple smarty magic.

use {$node->raw_menutext} in your menu manager template.

There are other ways too...

Re: Menu title in two lines

Posted: Wed Dec 24, 2008 2:13 am
by JeremyBASS
Just causeI forgot...
I try escapeing out all types of ways... not luck... I think you'd have to do some thing clever to fix it the way you want... like

{assign var=menutext value=$node->menutext|replace:'mnueNAME1':'mnueNAME1 addedNAME1'|replace:'mnueNAME2':''mnueNAME2 addedNAME2'}

and use this
{$menutext}

instead of this....  
{$node->menutext}

should work the best... you can add pages with out breaking it... and if you want more just add more to it...

cheers
jeremyBass

Re: Menu title in two lines

Posted: Wed Dec 24, 2008 2:14 am
by JeremyBASS
{$node->raw_menutext} ... really?  :D sweet I'll try that ...

Re: Menu title in two lines

Posted: Wed Dec 24, 2008 2:20 am
by JeremyBASS
{$node->raw_menutext} worked... sweet... I'll put the under my hat... does that work for more that there... like {raw_title}?

Re: Menu title in two lines

Posted: Wed Dec 24, 2008 10:02 am
by Mikk
Hi, great, i'll try that right now :-) if I can locate the file that needs the change
thanks

Re: Menu title in two lines

Posted: Wed Dec 24, 2008 10:13 am
by RonnyK

Re: Menu title in two lines

Posted: Wed Dec 24, 2008 10:23 am
by Mikk
Hi
thanks everyone trying to help me.

As it's the 1st time I work with CMSMS, I opened modules/MenuManager/templates/cssmenu.tpl, but could'nt locate where to add this hack to allow in menu names ..... can someone tell me ?

Thanks again for helping ;-)
Mikk

Re: Menu title in two lines

Posted: Wed Dec 24, 2008 10:26 am
by RonnyK
Mikk,

Go to Layout->MenuManager in the backend. Then go to Templates and import the cssmenu, and give it a new name. On the first tab, you can then modify the created menu-template...

In your page-template, you should then call the new-named menu-template instead of the cssmenu...

Ronny

Re: Menu title in two lines

Posted: Wed Dec 24, 2008 10:37 am
by Mikk
Hi Ronny

"Go to Layout->MenuManager in the backend." --> what am I suppose to do there Ronny? create a new layout and paste cssmnu.tpl content ? And what about the place to paste the Hack ?

Regards
Mikk

Re: Menu title in two lines

Posted: Wed Dec 24, 2008 10:47 am
by RonnyK
No... no pasting required...

First go to the file-templates tab.. Push the "Import template to database"-icon on the right of the cssmenu.tpl, in the popup, give it a name...

After submitting, you can modify the created template on the database-template tab. There you can modify the template,

Ronny