Page 1 of 1

show page not as link in menu [self-solved!]

Posted: Tue Oct 16, 2007 3:13 pm
by animaye
hi all, i hope someone can help. i have been able to figure out most of my questions with the help of this forum (you guys are fantastic!!), but have not been able to find anything on what i am attempting.

on the 'evaluator' tab at http://www.cropinsurancesolutions.com/test , you will see that i have a(n ugly!) menu that shows children as navigation for what will evenutally be a fairly extensive list. currently, the state name is a link and i want it to not be - there should be no content for that page, it just used as a backboard for the subpages (similar to how the evaluator page works as a backboard for this list of links - made possible by the 'start_element' tag).

currently my menumanager code for this menu is:

Code: Select all

{if $count > 0}
<ul>
{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><a 
{elseif $node->current == true}
	<li><a  
{elseif $node->haschildren == true}
	<li><a 
{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}>{$node->menutext}</a>
{elseif $node->type == 'sectionheader'}
>{$node->menutext}</a>
{/if}

{/foreach}

	{repeat string="</li></ul>" times=$node->depth-1}		</li>
	</ul>
<div class="clearb"></div>
{/if}
the menu is called from the evaluator page as:

Code: Select all

{hierarchy}{cms_module module='menumanager' start_element=$h_this template='evaluator' collapse='0' start_element="4.1"}
and from the 1st level pages (or STATE, if that makes it easier), the menu is called as (however, THERE SHOULD BE NO CONTENT ON THIS PAGE' - this will be the backboard for the COUNTY subpages):

Code: Select all

{hierarchy}{cms_module module='menumanager' start_element=$h_this template='evaluator' collapse='0' start_element="4.1.1" show_root_siblings='1'}
i hope that makes some sense?! wasn't too sure which codes you would need to help, but if you need something different, please just let me know and i will be happy to provide it.

to recap, i have a list of child links and i do not want the top level to be a link:
  • State Name - NO LINK
    • [li]County - LINK
    • County - LINK
    [/li]
thanks in advance!

Re: show page not as link in menu

Posted: Tue Oct 16, 2007 4:12 pm
by animaye
wow, nevermind, it was so simple! fyi, just changed the content type from 'page' to 'section header' and it worked like a charm.  i guess that's what happens when you try to overcomplicate things!! ::)