PDA

View Full Version : Hide widgets for particular articles


Stephf96
12-02-2010, 11:00 AM
How do I show a widget on the home page only?
e.g.

Recent Threads Widget and a
Custom PHP Direct Execution widget


I want to hide it when from users viewing other articles.

Is there a setting? If not can you point me to the hook/place where I can put in my code. Is it the nodeid you would use as the conditional?

Lynne
12-02-2010, 01:57 PM
No setting. I'd make custom templates, insert the template name into the Configure area of the widget, and put a condition around the template code. That condition has been posted around here somewhere because this issue has been brought up a couple of times.

Stephf96
12-03-2010, 01:57 PM
Thanks Lynne I found it.

For anyone else viewing this thread, here is the conditional.

<vb:if condition="$_GET[r] == x">stuff</vb:if>


where x is the nodeid.

use empty quotes for home page.