Hi all,
Just wondering if its possible to put static text in the CSS menu above sub categories etc.?
So say i have 3 types of kitchens, Contemporary, Modern and Classic, i'd like to have a little bit of text written in a smaller font saying "Please select one of the following" in the actual menu above the other options, anyone know how to do this?
I've seen it on other websites but they probably have a completely static CSS menu instead of the automatic one in CMSMS so just wondering if its even possible in CMSMS?
Thanks.
Static text in the CSS Menu?
Re: Static text in the CSS Menu?
You probably can add this in the template for whatever CSS menu you're using. It's easy to get lost rooting around in there with all the code, but it shouldn't be difficult to find.
reidjazz
reidjazz
Re: Static text in the CSS Menu?
Hey,
Thanks for the reply, im using the Horizontal CSS Menu:
But because everything is automatically filled into the menu by the CMS itself, how do i put a static piece of text to appear just above the "Kitchens / Our Range / Contemporary" link without it appearing at the top of other menu's? Where do i even put it anyway to get it even half working and i can mess around with it a bit after...?
Thanks.
Thanks for the reply, im using the Horizontal CSS Menu:
Code: Select all
{* CSS classes used in this template:
#menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the <ul>
.menuparent - The class for each <li> that has children.
.menuactive - The class for each <li> that is active or is a parent (on any level) of a child that is active. *}
{if $count > 0}
<div id="menuwrapper">
<ul id="primary-nav">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" 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->parent == true or ($node->current == true and $node->haschildren == true)}
<li class="menuactive menuparent"><a class="menuactive menuparent"
{elseif $node->current == true}
<li class="menuactive"><a class="menuactive"
{elseif $node->haschildren == true}
<li class="menuparent"><a class="menuparent"
{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span> {$node->menutext} </span>
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="separator" />
{else}
<li><a
{/if}
{if $node->type != 'sectionheader' and $node->type != 'separator'}
href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>
{elseif $node->type == 'sectionheader'}
><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1} </li>
</ul>
</div>
{/if}
Thanks.
Re: Static text in the CSS Menu?
Hello,
if you can't hack the menu's template, may be you can :
-put some static HTML around the {menu...} call in the page's template ?
-try the "link" content type to build your "static link" menu ?
Not sure it helps
Pierre M.
if you can't hack the menu's template, may be you can :
-put some static HTML around the {menu...} call in the page's template ?
-try the "link" content type to build your "static link" menu ?
Not sure it helps
Pierre M.
Re: Static text in the CSS Menu?
Is that menu actually a section header or can you click on it and go to a page?
Perhaps something like this, depending on where exactly you want this and it could be hard. The "alias_of_link" would be the alias you specified for the "Kitchens / Our Range / Contemporary" page.
It all depends on what type of page it is and where exactly you want that to show for where you'd put that code.
I learned a lot about how the menu works by taking it apart bit by bit. If you just put some dummy text in some spots you can start to see what generates what.
Example:
Hope this helps a little. Maybe, if you provide a link to your site and to the site you've seen something like this at I or someone else might be able to give you a better example. To create/edit the menu code in CMSms you do need some basic programming skills and need to be able to read and follow the logic.
Perhaps something like this, depending on where exactly you want this and it could be hard. The "alias_of_link" would be the alias you specified for the "Kitchens / Our Range / Contemporary" page.
Code: Select all
{if $node->name == "alias_of_link"}
"Type your text you want here, any HTML code is valid"
{/if}
I learned a lot about how the menu works by taking it apart bit by bit. If you just put some dummy text in some spots you can start to see what generates what.
Example:
This might make the code a little more readable to see what's going on, but it will generate ugly, un-readable, white space free HTML{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
falalalacurrent == true}
haschildren == true}
type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
type != 'sectionheader' and $node->type != 'separator'}
href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}>{$node->hierarchy}: {$node->menutext}
{elseif $node->type == 'sectionheader'}
>{$node->hierarchy}: {$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
{if $count > 0}
{strip}
{foreach item=node from=$nodelist}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
current == true}
haschildren == true}
type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
type != 'sectionheader' and $node->type != 'separator'}
href="{$node->url}"
{if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}
{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}
{if $node->titleattribute != ''}title="{$node->titleattribute}" {/if}
{if $node->target ne ""} target="{$node->target}"{/if}
>{$node->hierarchy}: {$node->menutext}
{elseif $node->type == 'sectionheader'}
>{$node->hierarchy}: {$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/strip}
{/if}
Hope this helps a little. Maybe, if you provide a link to your site and to the site you've seen something like this at I or someone else might be able to give you a better example. To create/edit the menu code in CMSms you do need some basic programming skills and need to be able to read and follow the logic.