Have some sidebar plugins only displayed on the frontpage

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
krist
Regular
Posts: 17
Joined: Sun Apr 09, 2006 7:54 pm

Have some sidebar plugins only displayed on the frontpage

Post by krist »

I'd like to have some sidebar plugins only being displayed on the frontpage. How can this be achieved?
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Its possible, but will require quite a lot of fiddling with .tpl files.

Start by adding an {if $startpage}show the plugins {else} create the normal overview or detail page {/if} to your index.tpl

Then you just need to use the showplugin hook to get your plugins onto the frontpage.

For example recent entries: {serendipity_showPlugin class="serendipity_plugin_recententries"}

or

categories: {serendipity_showPlugin class="@serendipity_categories_plugin"}

The categories plugin has an '@' symbol because this is an internal plugin. I hope that starts you off, sorry I don't have the time to give you more but maybe someone else can add to this.
krist
Regular
Posts: 17
Joined: Sun Apr 09, 2006 7:54 pm

Post by krist »

For the record: I just found out that the plugin serendipity_event_sidebarhider ist able to do what I wanted (without editing the template).
Post Reply