Page 1 of 1

Have some sidebar plugins only displayed on the frontpage

Posted: Sun Apr 09, 2006 8:01 pm
by krist
I'd like to have some sidebar plugins only being displayed on the frontpage. How can this be achieved?

Posted: Sun Apr 09, 2006 10:02 pm
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.

Posted: Sun Apr 30, 2006 10:36 pm
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).