Page 1 of 1

Need a freelancer for some menu manager help

Posted: Tue May 08, 2007 4:16 am
by liquid
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.

Thanks!

Re: Need a freelancer for some menu manager help

Posted: Tue May 08, 2007 5:35 am
by cyberman
Maybe we can do the job inside the forum :) ...

Re: Need a freelancer for some menu manager help

Posted: Tue May 08, 2007 11:44 am
by liquid
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.

Code: Select all

<ul id="main-navigation">
	<li class="active"><a href="#"><span>Home</span></a></li>
	<li><a href="#"><span>Key Issues</span></a></li>
	<li><a href="#"><span>Publications</span></a></li>
	<li><a href="#"><span>Movement Building</span></a>
		<ul class="level-1">
			<li><a href="#">Summer Retreat</a></li>
			<li><a href="#">SJ Awards</a></li>
			<li><a href="#">SJ Events Calendar</a></li>
			<li><a href="#" class="submenu">Students</a>
				<ul class="level-2">
					<li><a href="#">Option 1 Which Is Two Lines</a></li>
					<li class="last"><a href="#">SJ Awards</a></li>
				</ul>
			</li>
			<li class="last"><a href="#">Call to Teachers</a></li>
		</ul>
	</li>
	<li><a href="#"><span>Media</span></a></li>
	<li><a href="#"><span>Contribute</span></a></li>
	<li><a href="#"><span>About</span></a></li>
	<li><a href="#"><span>Contact</span></a></li>
</ul>

Re: Need a freelancer for some menu manager help

Posted: Wed May 09, 2007 2:37 pm
by liquid
Is no one interested in helping with this?

Re: Need a freelancer for some menu manager help

Posted: Thu May 10, 2007 11:17 am
by tsw
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 :/

based on one of the default templates

Code: Select all

{* 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}

Re: Need a freelancer for some menu manager help

Posted: Thu May 10, 2007 2:14 pm
by LeisureLarry
Smarty is your friend ;D

Example:

{foreach from=$nodelist item=node name=meta_entries}

{if $smarty.foreach.meta_entries.last}
last
{/if}

Re: Need a freelancer for some menu manager help

Posted: Thu May 10, 2007 3:45 pm
by tsw
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..

Re: Need a freelancer for some menu manager help

Posted: Thu May 10, 2007 4:08 pm
by Mateo1041
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.

Like this:

http://www.guiaparavivir.com/

Re: Need a freelancer for some menu manager help

Posted: Mon May 14, 2007 3:08 am
by liquid
Okay, so what if I removed the "last" requirement? I assume that makes it much easier.