[30]Allowing html in menu title
-
- Joomla! Apprentice
- Posts: 9
- Joined: Sat Mar 15, 2008 8:46 pm
[30]Allowing html in menu title
I think it can be useful to have some html (span tags etc.) in the menu title for am more sophisticated design.
Therefore I would like to suggest enabling or disabling the code cleaning function for the menu title in site configuration so that only a super administrator can make this decision.
So this function meets the need of a more design orientated aspect or a more secure aspect (when you have more people working in the backend).
This additional checkbox should make no problems for backward compatibility.
Therefore I would like to suggest enabling or disabling the code cleaning function for the menu title in site configuration so that only a super administrator can make this decision.
So this function meets the need of a more design orientated aspect or a more secure aspect (when you have more people working in the backend).
This additional checkbox should make no problems for backward compatibility.
-
- Joomla! Hero
- Posts: 2268
- Joined: Sat Feb 09, 2008 8:27 am
- Location: California, USA
Re: [30]Allowing html in menu title
I totally agree with this. Being able to insert HTML into the joomla menu title would be GREAT!
I currently have a lot of Registered Trademark symbols in my menu, pages, etc. The symbols are all placed in html superscript tags and I have made a CSS class for the <sup> tags. This works great in the articles where I have control.
The menu has the Registered Trademark symbol as large as the rest of the text because there is no way to input HTML into the menu currently. Hopefully this will be an option in the future!
Mark
I currently have a lot of Registered Trademark symbols in my menu, pages, etc. The symbols are all placed in html superscript tags and I have made a CSS class for the <sup> tags. This works great in the articles where I have control.
The menu has the Registered Trademark symbol as large as the rest of the text because there is no way to input HTML into the menu currently. Hopefully this will be an option in the future!
Mark
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: [30]Allowing html in menu title
FYI ™ is a common glyph found in all current Internet fonts and one does not need to use superscript to get it. It is part of the "Letterlike symbols"
On Macintosh one uses Option-2 to get it.
You may copy the glyph from here and use without need for html
™
as for ® it is never used as sup
This is not to say that html should not be used in Titles, but one has to think of the code consequences which could be quite heavy as the alias is made from the Title.
On Macintosh one uses Option-2 to get it.
You may copy the glyph from here and use without need for html
™
as for ® it is never used as sup
This is not to say that html should not be used in Titles, but one has to think of the code consequences which could be quite heavy as the alias is made from the Title.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Hero
- Posts: 2268
- Joined: Sat Feb 09, 2008 8:27 am
- Location: California, USA
Re: [30]Allowing html in menu title
Code: Select all
as for ® it is never used as sup
MyProductName®
Doesn't look as good as
MyProductName®
in my opinion! Of course the ® is not vertically aligned to the top here as I dont have CSS control but you can see a description of what I am talking about by Clicking here
I think it looks more professional having it smaller and aligned to the top of the word. Perhaps I am indeed using it the wrong way! What are your thoughts?
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: [30]Allowing html in menu title
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a U.S. registered 501(c)(3) tax-deductible nonprofit charity.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Fledgling
- Posts: 2
- Joined: Thu Oct 15, 2009 5:32 am
- Contact:
Re: [30]Allowing html in menu title
Code: Select all
<?
// extra code to make this work
$style = -2; // set the style
$position = "top"; // set the position of the modules to be loaded
// end of extra code
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('module');
$params = array('style'=>$style);
$contents = '';
foreach (JModuleHelper::getModules($position) as $mod) {
$contents .= $renderer->render($mod, $params);
}
// this part allows html characters to show correctly
echo html_entity_decode($contents);
?>
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: [30]Allowing html in menu title
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Fledgling
- Posts: 2
- Joined: Thu Oct 15, 2009 5:32 am
- Contact:
Re: [30]Allowing html in menu title
If you use the above code instead of <jdoc:include type="modules" name="top" />, it will correctly display any span tags, etc, that you put in your menu title.
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: [30]Allowing html in menu title
It does work OK indeed.
But one has better take care of the automatic alias created.
EDIT: And pathway looks weird too...
But one has better take care of the automatic alias created.
EDIT: And pathway looks weird too...
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group