Is there a way to use HTML in page name for navigation menu?

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
9/27/2014 9:58:31 PM
Gravatar
Total Posts 4

Is there a way to use HTML in page name for navigation menu?

Hello,

We'd like to show Copyright as <sup>®</sup> or Trade Mark as <sup>™</sup> in the page name so it can show up as superscript on the navigation menu.

However, every time I click on Save on Page Settings, it reverts the page name back to without HTML. I also tried to do a direct update in mp_pages table to update pagename field to have HTML, but the navigation menu still does not show it.

Is there a way to use any HTML in page name so it can show up in navigation menu?

Thank you!

10/1/2014 6:25:14 PM
Gravatar
Total Posts 4

Re: Is there a way to use HTML in page name for navigation menu?

Just want to provide more details to this post. This is what we try to do:

Instead of this in Page Name:

   Fun Cars® Fun Wheels™

We'd like to have this in Page Name so some of the characters can be superscripted and it can wrap at place we want to become two lines:

  Fun Cars<sup>®</sup><br />Fun Wheels<sup>™</sup>

 

Is it possible to do this in MojoPortal?

10/12/2014 12:46:42 PM
Gravatar
Total Posts 503
feet planted firmly on the ground

Re: Is there a way to use HTML in page name for navigation menu?

I don't think this is possible, but it would be interesting to hear from Joe whether it could be allowed in a future version?

Coincidentally, a colleague of mine is wanting to use mark-up in blog post titles, specifically italics for species names. This too doesn't seem possible at present - mark-up is stripped.

10/12/2014 1:38:32 PM
Gravatar
Total Posts 18444

Re: Is there a way to use HTML in page name for navigation menu?

For blogs it is complicated issue because the title also goes into the rss feed title and no markup is expected there. There is at minimum a bug in the blog because there is a descrepency between what a title can do in the list view vs the detail view. I can use &reg; in the post title to show a registered trademark glyph in the list view but on detail view its gets html encoded. I will definitely see about making that consistent but I'm not sure I can use encoded entities in the rss title. I need to look into it more. I don't know how we can allow html elements there safely, I'm open to suggestion, perhaps we could have a config setting whether to encode/filter it or to let people live dangerously and put whatever in there knowing it may mess up the rss feed.

For the main menu and cms pages it may be a similar issue but there is one little known way to get extra html into the menu. Each page/menu item supports a menu description where html is allowed but it is only supported if using flexmenu, and to get the new field for description to appear in page settings you need to explicitely enable it from theme.skin

<portal:PageLayoutDisplaySettings  runat="server" 
    ShowMenuDescription="true"
/>

so one option there is to put the symbols in the description

in addition to feed considerations it would make things kind of fragile to allow html in page names, one missing closing tag or extra opening tag can totally wack out the whole page layout and we don't usually want to make that easy for end users who usually don't know much about html. again maybe config options could be created to let those who want to live more dangerously do so.

10/13/2014 4:28:15 PM
Gravatar
Total Posts 4

Re: Is there a way to use HTML in page name for navigation menu?

We eventually did it in jquery to replace the HTML in the menu item with specific href. Something like this:

$("[href='/fun-car']").html('Fun Car<sup>&reg;</sup><br />From USA');

We understand this is not the ideal way to handle this. But our menu rarely changes and other page elements won't have href='/fun-car' as attribute. So, this works for us for now.

 

You must sign in to post in the forums. This thread is closed to new posts.