[solved] Menu items - showing <strong> not text in bold

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
redstarcreative

[solved] Menu items - showing <strong> not text in bold

Post by redstarcreative »

Hi everyone

My first post, and firstly I'd like to say CMS made simple is amazing - I am really impressed with it.  Ten out of ten.

However, I do have a slight quirk with my navigation, and I'm hoping it is an easy fix.

I would like my navigation to look like this:

Services Page - here's what we do

I've put the correct HTML in the 'Menu Text' field in the cms, and when I browse pages it looks perfectly fine.  However in my Menu Template it is HTML encoding i - so I get  <strong>.

Is there any way in the Menu Template that I can stop the HTML encoding, or using the CMSMS tags can I do a replace on the string to fix it?

Hope that explains it for you - thanks very much in advance, it's appreciated.   :)

Darren
Last edited by redstarcreative on Tue Sep 04, 2007 9:05 am, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Menu items - showing <strong> not text in bold

Post by RonnyK »

Darren,

if you want the menu to be bold, why don't you style the element through CSS. Meaning to add the bold, to the menu.

Code: Select all

/* Styling the basic apperance of the menu elements */
#primary-nav a { 
   font-weight: bold;
}
Ronny
redstarcreative

Re: Menu items - showing <strong> not text in bold

Post by redstarcreative »

The reason is Ronny that I am going to use CSS to format the text within the strong tag in a different font - so it would actually look maybe like this:

Services Page - here's what we do

I'm not responsible for the design, and my hands are pretty much tied into having it that way.

Many thanks

Darren
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Menu items - showing <strong> not text in bold

Post by RonnyK »

Maybe you can switch to HTML-mode in the editor, to check/enter the pure entered code, to see if that works. It might be the translation of the WYSIWYG that does this. If you can't switch to HTML, you might try switching to NO editor in user-preferences.

Ronny
redstarcreative

Re: Menu items - showing <strong> not text in bold

Post by redstarcreative »

I'm putting the tag in the 'Menu Text' box and not the Content box - and that's why I think the CMS is HTML encoding the .

Is there any way I can add another field to the page, and then display it in the Menu?  This way I could put a work-around in place for this.

Alternatively, in the menu code I can do things like {if} and {foreach} in the Menu template, can I use a replace function?

Many thanks

Darren
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Menu items - showing <strong> not text in bold

Post by RonnyK »

If you can't change the stylesheets, as I think that's the proper way to style the elements, you might want to ask the people that to style that, to change the element mentioned, for font-family and for font-weight.

I can't think of another way to do this, others might have a solution.

Ronny
redstarcreative

Re: Menu items - showing <strong> not text in bold

Post by redstarcreative »

I have full control over the CMS, and the content I put into CMSMS... but I can't change the design I've been asked to implement.

Is there are replace function that I can use in the template code?

Many thanks

Darren
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Menu items - showing <strong> not text in bold

Post by tsw »

This is a slight problem, there would need to be some way to specify that this is really a html tag and should not be encoded.

you might get lucky with smarty smarty modifiers (search for rexep) and use something like ### to mark your start tag..

another way might be by creating few more smarty blocks (like {bold} {/bold}), but this would mean one extra eval in menu structure (which might get a bit slow at some point).

hope this helps
redstarcreative

[solved] Re: Menu items - showing <strong> not text in bold

Post by redstarcreative »

Hi TSW

I have gotten around it - I put the first part of the title in the page title, and the rest in the Description field - it does the job  ;D

Thanks for your help.

Regards

Darren
Locked

Return to “Layout and Design (CSS & HTML)”