Is it possible to have a plugin appear only in a specific theme?
In the example below (Keyline_2) the menu is shown as tabs in the top section but when you switch themes (to Keyline) you don't have a menu.
I want to add an html nugget with a menu in it but I don't want it to appear on the first theme.
http://keylinelicensing.toondesign.biz/lobby/]Example
Any suggestions?
Cheers
Ian
Changing Plugins depending on themes
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Changing Plugins depending on themes
Yes, you can do that.
For that you need to put a sidebar.tpl into the theme that should not show the sidebar plugin. You will see this code in it (excerpt):
Now you can modify that to skip the HTML nugget:
See the IF statement I wrapped around the output? This will prevent showing the nugget with the title "Menu Nugget" in your theme.
HTH,
Garvin
For that you need to put a sidebar.tpl into the theme that should not show the sidebar plugin. You will see this code in it (excerpt):
Code: Select all
{foreach from=$plugindata item=item}
<div class="serendipitySideBarItem container_{$item.class}">
{if $item.title != ""}<h3 class="serendipitySideBarTitle {$item.class}">{$item.title}</h3>{/if}
<div class="serendipitySideBarContent">{$item.content}</div>
</div>
{/foreach}
Code: Select all
{foreach from=$plugindata item=item}
{if $item.title != 'Menu Nugget'}
<div class="serendipitySideBarItem container_{$item.class}">
{if $item.title != ""}<h3 class="serendipitySideBarTitle {$item.class}">{$item.title}</h3>{/if}
<div class="serendipitySideBarContent">{$item.content}</div>
</div>
{/if}
{/foreach}
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/