Sectionheader in menumanager

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.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Sectionheader in menumanager

Post by Elijah Lofgren »

mark 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'...  :(
Sure, I'm up for it. I think I'm addicted to making custom menu templates for people using the Menu manager  ;)
Instead of
I did:

Code: Select all

<tr><th class="tableh{table header number (a counter)}"> </th></tr>
which makes it more like: http://www.multiintech.com/old/index.html&nbsp; ;)

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}
I call it in my template with this:

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 
Here's the output I get (I shortened the URLs though):





Home
Vertical (bulletmenu)
One Content Column

Two Content Columns






child 1
child 2

I tried replacing the output of my menu template:

Code: Select all

<table id="mainTable">
...
</table>
with the the:

Code: Select all

<table id="mainTable">
...
</table>
on this page http://www.multiintech.com/old/index.html and it seemed to work!  :o  :)

Let me know how it goes.  ;)

Edit: removed extra ""
Last edited by Anonymous on Wed May 17, 2006 5:02 am, edited 1 time in total.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
nrkc

Re: Sectionheader in menumanager

Post by nrkc »

Cool, that works perfect! Now I only have a css problem (look www.capion.org) because the hole menu is in one , where it before were in two. But I think I will figure that out some day....

But thank you a lot for your help Elijah!
pimhd
Forum Members
Forum Members
Posts: 19
Joined: Mon Aug 28, 2006 12:47 pm

Re: Sectionheader in menumanager

Post by pimhd »

It it possible to modify the section_expand menu so that an expanded section folds in again when you click on a next sectionheader?

Can someone help me with that?
Locked

Return to “CMSMS Core”