I am trying to implement highlighted styling for specific menu items, described in that thread:
http://forum.cmsmadesimple.org/index.ph ... 812.0.html
I think since its not really a design question I might get better response here. What do you think its easier to let menumanager not convert HTML entities into encoded characters, or look for a smarter solution?
modifying menumanager not to encode HTML entities
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: modifying menumanager not to encode HTML entities
This is simple, it's a one line change
find the line in MenuManager/MenuManager.module.php like:
and directly below it add:
then use
in your menumanager templates.
find the line in MenuManager/MenuManager.module.php like:
Code: Select all
$onenode->menutext = my_htmlentities($content->MenuText());
Code: Select all
$onenode->raw_menutext = $content->MenuText();
Code: Select all
{$node->raw_menutext}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: modifying menumanager not to encode HTML entities
Thank you Calguy!
I didn't think it could be as easy as this!
Now I have a 100% identical code to my older version, but have the ability to upgrade from 1.2.5 to 1.4.1!
I didn't think it could be as easy as this!
Now I have a 100% identical code to my older version, but have the ability to upgrade from 1.2.5 to 1.4.1!
Re: modifying menumanager not to encode HTML entities
QUestion;
I am the opposite, where I need HTML entities in my menu text. Do I:
1. Take out
in MenuManager.module.php?
and do I need to modify my menu template? This is my menu template:
I am the opposite, where I need HTML entities in my menu text. Do I:
1. Take out
Code: Select all
$onenode->raw_menutext = $content->MenuText();
and do I need to modify my menu template? This is my menu template:
Code: Select all
{if $count > 0}
<ul class="nav">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul class=\"nav2\">" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if $node->current == true}
<li class="currentpage"><a class="activeparent" href="{$node->url}" title="{$node->menutext}">{$node->menutext}</a>
{elseif $node->parent == true}
<li class="activeparent"><a class="activeparent" href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"}"{else} title="{$node->menutext}"{/if}>{$node->menutext}</a>
{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><h2 class="nav">{$node->menutext}</h2>
{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />
{else}
<li><a href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{else} title="{$node->menutext}"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->menutext}</a>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
Re: modifying menumanager not to encode HTML entities
None of them.
HTML-Enities will be by default.
You only need to change if you want something "special".
If you didn't insert or change something you don't need to remove something or undo changes.
That's kind of logic isn't it
HTML-Enities will be by default.
You only need to change if you want something "special".
If you didn't insert or change something you don't need to remove something or undo changes.
That's kind of logic isn't it