RESOLVED - Banging my head off a wall due to navigational blandness.

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.
Post Reply
bazzlad
Forum Members
Forum Members
Posts: 20
Joined: Tue May 29, 2007 7:12 pm

RESOLVED - Banging my head off a wall due to navigational blandness.

Post by bazzlad »

RESOLVED!
Last edited by bazzlad on Mon Dec 10, 2007 3:57 pm, edited 1 time in total.
Pierre M.

Re: Banging my head off a wall due to navigational blandness.

Post by Pierre M. »

Hello,
bazzlad wrote: The problem is, I don't have the foggiest idea how to change the look of the menus.
You may be interested by http://themes.cmsmadesimple.org/ and the Menu Manager if you (edit:typo)don't know them yet.

BTW, you may like pretty URLs as an optional setting.

Pierre M.
Last edited by Pierre M. on Wed May 30, 2007 10:13 am, edited 1 time in total.
mechro

Re: Banging my head off a wall due to navigational blandness.

Post by mechro »

Something that might help a little more is that the menus are styled with their own style sheets.  They are appropriately named in the stylesheets manager for what they do, but what you may not know is that the default menu template is hardcoded with the tag in the template manager.
You want to for a line similar to this:

Code: Select all

 <div id="menu_vert">
      <h2 class="accessibility">Navigation</h2>
      {menu template='cssmenu.tpl' collapse='0'} </div>
Change the whatever.tpl to the one you want to use.  It looks like you tried to use the cssmenu option, but without changing the tpl the stylesheet breaks and you get what you see on your site.  I hope this helps you a little more.  I really didnt find menumanager that helpful for what I wanted to do.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Banging my head off a wall due to navigational blandness.

Post by calguy1000 »

Menumanager is a very flexible way of creating dynamic menus out of your page heirarchy.  You just have to adapt a stylesheet to your menu manager template, and/or create/edit a menu manager template to suit your needs.

First however, when dealing with menu manager, you need to have an idea of what the menu itself should look like in HTML, then you can work with the menu manager templates, slowly tweaking them until the HTML looks the way you ant it to.  When that is under control, then it can be styled either by using an existing stylesheet that is attached to the 'page template', or by creating a new one and associating that with the page template.

Secondly, there is no 'automatic' link between the stylesheets that are attached to your template, and to your menu manager.  If you want to use the style 'whateveriwant' in your mm template, you are free to do that, and to put the styles associated with the menu in whatever stylesheets that are attached to the 'page template' that you see fit.  There are some 'default' associations, and some somewhat intelligent organization to the stylesheets, but nothing is set in stone.

Thirdly, In 'menu manager syntax', if you specify a .tpl extension on the {menu template=...} tag, it will look for a file template with that name (.tpl) in the menu manager templates directory.  If you specify a template without the .tpl extension, it will look for a database template with that name.  The menu manager module allows you to copy file templates to database templates for modification and customization, however you need to be concious of how you call the menumanager.

I hope these tidbits help.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
bazzlad
Forum Members
Forum Members
Posts: 20
Joined: Tue May 29, 2007 7:12 pm

Re: Banging my head off a wall due to navigational blandness.

Post by bazzlad »

Thanks for your help.
Still not there and feeling rather thick now.

Ok here's what I've done.

I created a copy of a Menu Manager template, and called it b2a.

I called it on my site template:

Code: Select all

{cms_module module='menumanager' template='b2a' collapse='1'}
As it's in database templates I didn't add the .tpl on the end.

I then edited the b2a template and added this as a test:

Code: Select all

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

I then even deleted all the code on the template.

Nothing.

Do I need to style anything on my template stylesheet? If so, what?

Thanks,
Rich

Edit:
Nb this is the full code inside the b2a file:

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}
<ul class="clearfix">
{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><a href="{$node->url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>

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

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

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

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

{/if}

{/foreach}

{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm

Re: Banging my head off a wall due to navigational blandness.

Post by KO »

You edit stylesheet attached to your page template (not Menu template) until you get your menu to look as you wanted. "Menu templates" are used by "menu manager module" that is called in "page templates".

As those menu's are done with list elements add stuff like:

#left ul {list-style-type:none;}
#left ul li {padding:0px;margin:3px}
#left ul li a {padding:0px 8px;text-decoration:none;text-transform:uppercase;border-left:3px solid;line-height:1.8em}
#left ul li a.currentpage, #left ul li a:hover {color:#333;}

or whatever you want to your stylesheet. I think you know css better than I do as you done very complicated stuff.

br,

K
bazzlad
Forum Members
Forum Members
Posts: 20
Joined: Tue May 29, 2007 7:12 pm

Re: Banging my head off a wall due to navigational blandness.

Post by bazzlad »

Ahh, you're a star! That was all I needed!

THANK YOU!
Post Reply

Return to “CMSMS Core”