Loading...
 
Themes

Themes


Change the Topbar menu with theme?

Canada

I have some areas of the site where I want a layout similar to the main site identity, but with a different top bar menu.

What's the best way to get a topbar menu that is different from the default one entered in the site's Look n Feel?

I'd want to be able to assign this with a category.

Cheers!

Japan

As of Tiki 4, the Look and Feel topbar menu admin doesn't have any awareness of category or theme. As far as I know, you need to use the site header or topbar custom code textarea to enter some code like {if $categId="x"}menu syntax for that category goes here{else}default menu syntax goes here{/if}. Of course the normal topbar menu will continue to display unless you add a display:none in the stylesheet or don't activate it to begin with.

Alternatively, you could edit the tiki-sitemenu.tpl file to add the filtering there.

I've thought for a while that the Look and Feel admin page should have a text field to give site admins more flexibility about the topbar menu, in addition to the standard Tiki menu ID. Maybe for Tiki 5, coming soon.

-- Gary


Canada

Ah.

Here's what I tried. I made a tiki-sitemenu.tpl file that just says {menu id=50 type=horiz css=y} and saved it in the new theme folder in /templates/styles

This works perfectly when I select the new theme manually with the theme selector. However, when I use a category to assign the new theme to a page (which is the point of this exercise) it indeed switches to the desired css file, and it respects the new theme's settings for sidebar modules, but does not pick up menu 50 and continues to display the site's default menu=43

It made me crazy because I thought I had it skulled out. Why does it work manually, but not when assigned by category (or item) in Theme Control?

(ps I just got an error here posting via the Reply button and had to come back and post via Post new message...)


Canada

My objective is to show menu 50 to category 196, otherwise do the normal thing. Where did I go wrong?

This just does the normal thing regardless.

Copy to clipboard
{* $Id: tiki-sitemenu.tpl 22867 2009-11-04 12:05:31Z jonnybradley $ *} {* site header horizontal menu *} {if $categId eq '196'} {menu id=50 type=horiz css=y} {else} {if $prefs.feature_top_bar eq 'y' and $prefs.feature_sitemenu eq 'y'} {if $prefs.feature_cssmenus eq 'y'} {menu id=$prefs.feature_topbar_id_menu type=horiz css=y} {elseif $prefs.feature_phplayers eq 'y'} {phplayers id=$prefs.feature_topbar_id_menu type=horiz} {/if} {/if} {/if}



ps I keep getting errors trying to post here.


Japan

This syntax works for me (for another purpose) in head custom code: {if $categId=196}.... UPDATE: Oops, sorry. That doesn't work after all. It evaluates as always true. Still, I think this is possible some way, so will keep checking.

About assigning a theme on an object level (page, etc.) in Tiki 4, it seems to be buggy. At themes.tw.o, themes have been assigned to pages to demo them, but it's been broken for quite a while, and now only partially works. I'm hoping it can get fixed before Tiki 5 comes out (within next few months).

-- Gary



Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting