WebsiteBaker Community Forum (upd)

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: Availor on August 02, 2008, 02:05:47 PM

Title: making different menu layout for different pages
Post by: Availor on August 02, 2008, 02:05:47 PM
I'm trying to play around with some ideas I have. The idea is to create different classes for different pages.
For example - first page will be blue, about pages will be green and downloads page will be yellow.

Here is my try with the code, which works partially...

<?php show_menu(111true'<li>[a][menu_title][/a]</li>''''''''''
    [if(PAGE_ID == 1) { class="active1" }]
    [elseif(PAGE_ID == 2) { class="active2"}]
    [else { class="active" } ]
    
    '
); ?>


I guess I'm doing something wrong there but you get the idea...
Title: Re: making different menu layout for different pages
Post by: Bramus on August 02, 2008, 05:28:17 PM
i think you can also do it by making different style sheets for the page_ids and then in the head section where you call the stylesheet make an if/else statement that checks for the page_id and then takes the style sheet that belongs to that page_id.

In that case you first make the site working with 1 stylesheet, then just edit the colours you want and save it on a different name like page_id2.css or contact.css or something like that.
Title: Re: making different menu layout for different pages
Post by: Availor on August 02, 2008, 07:56:00 PM
That's also an idea... have to try that out  although it would be nice to let the user edit it from the backend