Creating a menu for template

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
47er

Creating a menu for template

Post by 47er »

Hello,

I'm using the same layout like this page: http://www.karlsworld.net/about.html.
Now i want to create a menu for the top navigation level 1 menu and at the left sidebar a menu for level 2 and deeper...

The hole day I'm spending for that, but it doesn't works.

Is there a Pro out there who could help me???

thanks for everything!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Creating a menu for template

Post by Dr.CSS »

How much have got so far?... link?...

Looks like andreas01... http://multiintech.com/index.php/squared/andreas01.html

With tabbed menu at top..., just not jumpin... ;) http://www.multiintech.com/cmsms2/index ... ptabs.html
47er

Re: Creating a menu for template

Post by 47er »

I've reached a lot the past hours, but there is a question:

here you can see my source for menu template, i have to do this:
The menu in html looks like the following, and I have to write before and after the name a span-tag, but with my template it doesn't work... could somebody PLEEAASE help me?

thanks

html:

Code: Select all

<ul class="sidemenu">
<li>
<a title="Home Page, shortcut key=1" accesskey="1" href="http://www.snowbound.ch/site/">Home</a>
</li>
<li>
<a href="http://www.mysite.com/index.php?page=how-cmsms-works">[color=red]<span>[/color]How CMSMS Works[color=red]</span>[/color]</a>
</li>
<li>
</li>
<li>
</li>
</ul>

Template:

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}
{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->current == true}
<li class="currentpage"><h3><span>{$node->menutext}</span></h3>

{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=<span>"{$node->titleattribute}"</span>{/if}><span>{$node->menutext}</span></a>

{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span>{$node->menutext}</span>

{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />

{else}
<li><a href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''}title=<span>"{$node->titleattribute}"</span>{/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}
cyberman

Re: Creating a menu for template

Post by cyberman »

47er wrote: Now i want to create a menu for the top navigation level 1 menu and at the left sidebar a menu for level 2 and deeper...
CMSms default install comes with a template named "Top simple navigation + left subnavigation + 1 column".

If I'm right it does what you want ::) ...
47er

Re: Creating a menu for template

Post by 47er »

something like that, right!
I'm working with it, but have to use the span-tag!!!
cyberman

Re: Creating a menu for template

Post by cyberman »

Why do you want an additional span tag?

You can use

Code: Select all

ul.sidemenu li.currentpage h3 {}
to formatting ...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Creating a menu for template

Post by Dr.CSS »

And what you have is not working? how did you use the menu tag?...

Your first code post shows and your menu template shows...

{if $count > 0}


Are you using the second posted code for a menu template and calling it in your tag {menu template='name of your template'} with out the .tpl?...
47er

Re: Creating a menu for template

Post by 47er »

Thanks for your help, but with trying -> it works!! ;-)
Locked

Return to “Layout and Design (CSS & HTML)”