[ Resolved ] Menu title in two lines

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Mikk
Forum Members
Forum Members
Posts: 15
Joined: Tue Dec 23, 2008 10:57 pm

[ Resolved ] Menu title in two lines

Post 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
Last edited by Mikk on Wed Dec 24, 2008 4:10 pm, edited 1 time in total.
JeremyBASS

Re: Menu title in two lines

Post by JeremyBASS »

\n ?
Mikk
Forum Members
Forum Members
Posts: 15
Joined: Tue Dec 23, 2008 10:57 pm

Re: Menu title in two lines

Post by Mikk »

hi, thanks for helping, but unfortunately " \n"  will also show on the menu...just tried it.
any other idea ?

thanx
Mikk
JeremyBASS

Re: Menu title in two lines

Post 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...
Mikk
Forum Members
Forum Members
Posts: 15
Joined: Tue Dec 23, 2008 10:57 pm

Re: Menu title in two lines

Post by Mikk »

thanks for trying to help though ;)

did someone already succeeded in doing a in a menu title ?
thanks
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Menu title in two lines

Post by calguy1000 »

this is simple smarty magic.

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

There are other ways too...
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
JeremyBASS

Re: Menu title in two lines

Post 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
JeremyBASS

Re: Menu title in two lines

Post by JeremyBASS »

{$node->raw_menutext} ... really?  :D sweet I'll try that ...
JeremyBASS

Re: Menu title in two lines

Post by JeremyBASS »

{$node->raw_menutext} worked... sweet... I'll put the under my hat... does that work for more that there... like {raw_title}?
Mikk
Forum Members
Forum Members
Posts: 15
Joined: Tue Dec 23, 2008 10:57 pm

Re: Menu title in two lines

Post by Mikk »

Hi, great, i'll try that right now :-) if I can locate the file that needs the change
thanks
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Menu title in two lines

Post by RonnyK »

Mikk
Forum Members
Forum Members
Posts: 15
Joined: Tue Dec 23, 2008 10:57 pm

Re: Menu title in two lines

Post 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
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Menu title in two lines

Post 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
Mikk
Forum Members
Forum Members
Posts: 15
Joined: Tue Dec 23, 2008 10:57 pm

Re: Menu title in two lines

Post 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
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Menu title in two lines

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

Return to “Developers Discussion”