[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 1823: Undefined array key 22918
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 1833: Trying to access array offset on value of type null
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 1833: Trying to access array offset on value of type null
CMS Made Simple Forums • Adding line breaks in Title and Menu text
Page 1 of 1

Adding line breaks in Title and Menu text

Posted: Mon Aug 28, 2006 1:40 pm
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

Re: Adding line breaks in Title and Menu text

Posted: Tue Aug 29, 2006 8:29 am
by allaboutseb
Thanks Mark,

i have now edited my original post accordingly.

Seb

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

Posted: Wed Dec 19, 2007 9:17 pm
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.

Re: Adding line breaks in Title and Menu text

Posted: Tue Aug 26, 2008 1:50 pm
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_':''}.