Page 2 of 2
Re: SOLVED : I don't know where to start
Posted: Fri Oct 26, 2007 9:33 pm
by Eskymo
Hi Mark
Ok - so on reflection, I have no idea what that menu code does or what it means or where to put it. Have you written that specifically related to the navigation in my CSS, or is that code that is generic that I need to modify and apply to my style of navigation.
I'm bemused how the linkage works as I'm used to working with flat sites, where you just type in the url you want your link to go to. I need to do three types of navigation for my site and I'm going to post up a new thread related to my query, but just wanted to check with you what this code is that you supplied.
Thanks
E
Re: SOLVED : I don't know where to start
Posted: Sat Oct 27, 2007 3:11 am
by Dr.CSS
That is the least amount of calls in the menu template to make your CSS work, you would copy it and go to layout > menu manager click add new template and paste it in and name it then submit, in your HTML/template where you want the menu put...
{menu template="thenameofit"}
It has menu item text like you need... Home
ok I forgot the li id that would be this...
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->current == true}
alias}"[/color]>url}" class="currentpage"> {$node->menutext}
{else}
alias}"[/color]>url}"> {$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
Re: SOLVED : I don't know where to start
Posted: Mon Oct 29, 2007 10:02 am
by Eskymo
Hi there
I've done what you've suggested and added a new template to the menu manager and called it primary_nav and copie dyou code into that. I then pasted {menu template="primary_nav"} where I want the menu to appear. I then viewed my site and instead of my menu I'm getting the following:
Code: Select all
# How CMSMS Works
* Templates and stylesheets
* Pages and navigation
* Content
* Menu Manager
* Extensions
* Events Manager
* Workflow
* Where do I get help?
# Default Templates Explained
* CMSMS tags in the templates
* Left simple navigation + 1 column
* Top simple navigation + left subnavigation + 1 column
* CSSMenu top + 2 columns
* CSSMenu left + 1 column
* Minimal template
# Default Extensions
* Modules
o News
o Menu Manager
o Theme MaNager
o TinyMCE
o Search
o Module Manager
* Tags
o Tags in the core
o User-defined tags
# test
What fundamental thing have I missed?
Re: SOLVED : I don't know where to start
Posted: Mon Oct 29, 2007 11:12 am
by Eskymo
I've managed to solved the nav list that appeared, by de-activating the pages that I don't need and now only Home appears as that's the only page I have active at the moment. But the background image is not appearing, even though I have the stylesheet for the navigation attached to the template. Any ideas?
I've fixed this now - the ul should've been id="primarynav" instead of class="primary-nav" - took me ages to find but I've got the nav in place now. Thanks for the help - I could never have written that code myself.
Now I need to ask - is there a way of setting the current page to have the active state of the button? I normally do this with php and label each page and then within the ahref add a bit of php that check the label of the page and sets the class of the link to be active.
I've fixed this also by changing 'currentpage' to 'active'
I can't get the rest of the navigation to show up though. Viewing the source of the site shows only one list item for home. None of the other page links show up. I've just created the services page and can't link to it. How do I get the code you wrote to generate the list items for all the primamry nav?
Sorry - error on my part - I hadn't actually added the page - just the template.
Re: SOLVED : I don't know where to start
Posted: Mon Oct 29, 2007 3:14 pm
by stopsatgreen
You should know enough now to have an understanding of how it all fits together. Now read the help files for the modules and tags and you should see how you can start to extend your knowledge.