For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
This is a request for freelancers - I need someone to help me who's adept at working with the menu manager. It's the one part of CMSMS that I've never been able to figure out!
I have a pretty specific menu that I need to have generated from the menu manager. I can send you exactly what the finished menu should look like - I need the code that would make that happen. Please PM me if you're interested, and I'll send you what the finished menu should look like so that you can quote appropriately.
Sure, here's the output that I need if you want to give it a shot. It's just an example with some test cases (the two lines) thrown in. It's a CSS drop down menu when it's finished. Only the active parent needs to have the class of active, since it's a drop down.
cant think of a way to get the last of sublevel, but hackish solution would be to use some extra property like accesskey as a flag, but it means manual work :/
{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.separator - To style the ruler for the separator *}
{if $count > 0}
<ul>
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{capture name=thislevel assign=thislevel}{$node->depth}{/capture}
{repeat string="<ul class=\"level-$thislevel\">" 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="current"><a class="current" href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}><span>{$node->menutext}</span></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}"{/if}><span>{$node->menutext}</span></a>
{elseif $node->type == 'sectionheader'}
<li class="sectionheader">{$node->menutext}
{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />
{else}
<li {if $node->tabindex != ''}class="last"{/if}><a 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 != ''} target="{$node->target}"{/if}><span>{$node->menutext}</span></a>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
wont work in this situation, the array has multiple "depths" and its only run through once (so only really the last link would get marked) what we need is a way to peek into the next item and check its depth..
I'd be up for helping with this as I've put together a few menus now. But I'm no expert with fancy Smarty stuff. I just modify the default menu file and go from there with what's already available.