Re: Sectionheader in menumanager
Posted: Wed May 17, 2006 4:56 am
Sure, I'm up for it. I think I'm addicted to making custom menu templates for people using the Menu managermark wrote: ok... do you think you could make one to spit out something like this....
...
i know i hate tables but it is a list/table of data... the JS that drives that other /old/ one is called out in tables if i could get my menu spit out this way.... OH YA
so you up for it? i would but i don't know how these 'loop'...![]()
Instead of
I did:
Code: Select all
<tr><th class="tableh{table header number (a counter)}"> </th></tr>Here's the Menu Template (I named it "marks_menu_table"):
Code: Select all
{* CSS classes used in this template:
#active - The active/current page
hr.separator - To style the ruler for the separator
span.sectionheader - To style section header *}
{if $count > 0}
<table id="mainTable">
{foreach from=$nodelist item=node}
{if $depthcheck == 1 && $node->depth != $node->prevdepth}
{assign var="depth" value=$node->depth}
{assign var="depthcheck" value="0"}
{/if}
{if $node->depth != $depth && $collapseopened == 1}
</table></td></tr>
{assign var="collapseopened" value="0"}
{/if}
{if $node->current == true}
<tr><td><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a></tr></td>
{elseif $node->type == 'sectionheader'}
{assign var="depthcheck" value="1"}
{assign var="collapseopened" value="1"}
<tr><td><table>
{counter assign="table_num"}
<tr><th class="tableh{$table_num}"> </th></tr>
{else}
<tr><td><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a></tr></td>{/if}
{/foreach}
</table></td></tr>
</table>
{/if}
Code: Select all
{cms_module module='menumanager' template='marks_menu_table'}Page structure I tested with:
Code: Select all
Title | Type
Section Header Section Header
- Home Content
- Vertical (bulletmenu) Content
- One Content Column Content
- Two Content Columns Content
2nd section header Section Header
- child 1 Content
- child 2 Content
I tried replacing the output of my menu template:
Home
Vertical (bulletmenu)
One Content Column
Two Content Columns
child 1
child 2
Code: Select all
<table id="mainTable">
...
</table>Code: Select all
<table id="mainTable">
...
</table>Let me know how it goes.
Edit: removed extra ""