Menu structur

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"
nivekiam

Re: Menu structur

Post by nivekiam »

The look and feel of the simple navigation menu can be 100% controlled with CSS and it can degrade very gracefully.  Perhaps you should just try it.  I know you can get what you are looking for.  The first example I posted can also be brought into working with CMSms, but it would take work.  However, it is also list based and not table based.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu structur

Post by Dr.CSS »

OK well the 'Mains' could be menuparent in the Menu manager template so you can style it your way, look in another template to find the call, the cssmenu has this line in it that you could use to pick the parent out and style it...

{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
current == true}
haschildren == true}
type == 'sectionheader'}
        {$node->menutext}
{elseif $node->type == 'separator'}
       
{else}

And you can take the references to ul li out of it...
User avatar
lollipop27
Forum Members
Forum Members
Posts: 237
Joined: Wed Sep 12, 2007 4:09 pm

Re: Menu structur

Post by lollipop27 »

But the main and subcategories come automatically as soon as you give the sub pages a parent page...

no?

And then you just style them as such...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu structur

Post by Dr.CSS »

OK you may be looking for something like this, it has no ul li...

http://forum.cmsmadesimple.org/index.ph ... 489.0.html
tcdk
Forum Members
Forum Members
Posts: 64
Joined: Wed Jan 17, 2007 10:39 am

Re: Menu structur

Post by tcdk »

mark wrote: OK well the 'Mains' could be menuparent in the Menu manager template so you can style it your way, look in another template to find the call, the cssmenu has this line in it that you could use to pick the parent out and style it...

{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
current == true}
haschildren == true}
type == 'sectionheader'}
        {$node->menutext}
{elseif $node->type == 'separator'}
       
{else}

And you can take the references to ul li out of it...
Here you can only style "main" if it has "subs" ..

I have "mains" with no subs.

Isen't it possible to write out mains and subs completly apart?


What is the tag for write out "main" and "subs" ?
tcdk
Forum Members
Forum Members
Posts: 64
Joined: Wed Jan 17, 2007 10:39 am

Re: Menu structur

Post by tcdk »

Look at the menu here at cmsmadesimple.org .. it's exactly like that one (not as dropdown ofcource)
But all the mains is with large types, and the subs are with small.. and there's a images under.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu structur

Post by Dr.CSS »

Those things are achieved with ul li unfortunately for you...

#primary-nav li {the style you want say, font-weight:bold; font-size:20px}

Second level...

#primary-nav li li {new style you want, font-weight:normal; font-size:12px}

And to keep only one submenu open use collapse="1" in the menu call...
tcdk
Forum Members
Forum Members
Posts: 64
Joined: Wed Jan 17, 2007 10:39 am

Re: Menu structur

Post by tcdk »

Are there anyway to writeout submenues? Then I will make the menu in php with "cases"
tcdk
Forum Members
Forum Members
Posts: 64
Joined: Wed Jan 17, 2007 10:39 am

Re: Menu structur

Post by tcdk »

found out, that these lines in simple menu, "styles" the submenues:

Code: Select all

{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<START TAG>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="<END TAG>" times=$node->prevdepth-$node->depth}
I've removed all classes, and set the "" tag style to the "main" category style.

Are the anyway where I can style in the "repeat" string? If I set in eg. "" it works, but if I try with it dosen't work.

Is it possible to change font size in subs?
tcdk
Forum Members
Forum Members
Posts: 64
Joined: Wed Jan 17, 2007 10:39 am

Re: Menu structur

Post by tcdk »

This is my menu btw:

Code: Select all

{* CSS classes used in this template:
.currentpage - The active/current page
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *} 
{if $count > 0}

{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<b>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</b>" times=$node->prevdepth-$node->depth}

{elseif $node->index > 0} 
{/if}

{if $node->current == true}
<br><a href="{$node->url}" {if $node->target ne ""} target="{$node->target}"{/if} > {$node->menutext} </a>

{elseif $node->parent == true && $node->depth == 1}
<a href="{$node->url}" {if $node->target ne ""} target="{$node->target}"{/if} > {$node->menutext} </a>

{elseif $node->type == 'sectionheader'}
{$node->menutext}

{elseif $node->type == 'separator'}
<hr class="separator" />

{else}
<br><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if} > {$node->menutext} </a>

{/if}

{/foreach}

{repeat string="<br>" times=$node->depth-1}

{/if}
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu structur

Post by Dr.CSS »

You could try using then it will be able to take a style...
tcdk
Forum Members
Forum Members
Posts: 64
Joined: Wed Jan 17, 2007 10:39 am

Re: Menu structur

Post by tcdk »

Like this?

Code: Select all

{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<span><ul class='submenu'>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</ul></span>" times=$node->prevdepth-$node->depth}

That dosen't work.

This menu is giving me gray hairs!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu structur

Post by Dr.CSS »

If you are willing to use ul li then use a default menu and it will give the ability to add your classes how you want...

What do you have against ul li, I was never quite sure what it was?...
tcdk
Forum Members
Forum Members
Posts: 64
Joined: Wed Jan 17, 2007 10:39 am

Re: Menu structur

Post by tcdk »

If I can style away the li's I dosen't have anything against em :)

I just dosen't think the fit in to this site.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu structur

Post by Dr.CSS »

If this "If I can style away the li's" means getting rid of the bullets that an ul li would most times have yes it's ul {list-style-type: none;} if you look at the CSS for a default menu, vertical for yours, there is a short list of calls, #primary-nav #primary-nav li etc., especially the ones that say don't mess with these unless you know what your doing that will give you a basis for starting yours, the others below it should mostly be for the styling that you can change to suit your needs...
Post Reply

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