SOLVED : I don't know where to start

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.
Eskymo

Re: SOLVED : I don't know where to start

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: SOLVED : I don't know where to start

Post 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}
Eskymo

Re: SOLVED : I don't know where to start

Post 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?
Eskymo

Re: SOLVED : I don't know where to start

Post 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.
Last edited by Eskymo on Mon Oct 29, 2007 12:59 pm, edited 1 time in total.
stopsatgreen
Power Poster
Power Poster
Posts: 322
Joined: Sat Feb 04, 2006 1:24 am

Re: SOLVED : I don't know where to start

Post 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.
Locked

Return to “CMSMS Core”