Adding line breaks in Title and Menu text

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
allaboutseb

Adding line breaks in Title and Menu text

Post by allaboutseb »

Hello everyone,

i'm running CMSMS 0.13 with PHP Version 4.4.3, MySQL 4.1.21 and apache.

The whole set-up runs very smoothly, but i can't figure out how to add a line break in a page title and/or menu text when editing/creating pages via the admin interface.

Example:

I have a Page Title that I'd like to break at a specific place - ex. "Hotel XYZConference & Spa Resort".
So, among other things I tried adding a
tag in the Title field. But the tag is simply ignored and just displayed as text when the page is viewed.
Surely, this must  be possible somehow?

Any help is greatly appreciated,

Seb
Last edited by Guest on Tue Aug 29, 2006 8:36 am, edited 1 time in total.
allaboutseb

Re: Adding line breaks in Title and Menu text

Post by allaboutseb »

Thanks Mark,

i have now edited my original post accordingly.

Seb
raindogmx

Re: Adding line breaks in Title and Menu text [solved]

Post by raindogmx »

I used this with success in a menu template:

{$node->menutext|replace:'_br_':'
'}

It means the menu text should have '_br_' where you want the line breaks to appear.
Last edited by raindogmx on Wed Dec 19, 2007 9:23 pm, edited 1 time in total.
Didiero

Re: Adding line breaks in Title and Menu text

Post by Didiero »

In your page template change the tag {title} in the headline to {title|replace:'_br_':'
'}. You can then type the string '_br_' into your page title in the backend to trigger a line break in your headline.

You will probably want to avoid to have that string in your breadcrumbs and page's top title tag, therefore add: {breadcrumbs|replace:'_br_':'' starttext='' root='Home' delimiter='»'}, {title|replace:'_br_':''}.

You probably also don't want the special string in your search results page. To get rid of it you visit "Extensions/Result Template" and go: {$entry->title|replace:'_br_':''}, {$entry->urltxt|replace:'_br_':''}.
Last edited by Didiero on Wed Aug 27, 2008 10:26 am, edited 1 time in total.
Locked

Return to “CMSMS Core”