Page 1 of 1

Identify static pages

Posted: Fri Oct 05, 2012 9:18 am
by msuess
I just want to identify if a page is generated by a specific plugin, e.g. static pages. The $view variable only allows checking the general value plugin.

Re: Identify static pages

Posted: Fri Oct 05, 2012 10:07 am
by garvinhicking
msuess wrote:I just want to identify if a page is generated by a specific plugin, e.g. static pages. The $view variable only allows checking the general value plugin.
You can only do that by adding code to the plugin; multiple plugins can inject themselv into a page, so the s9y core simply passes content along from and to the plugin; the plugin itself is responsible for adding/setting template variables for you to evaluate.

If a page is created by the staticpage plugin, you can check that with:

Code: Select all

{if $staticpage_pagetitle != ''}
I come from the statipage plugin!
{else}
I am not your father, Luke.
{/if}
HTH,
Garvin

Re: Identify static pages

Posted: Fri Oct 05, 2012 11:06 am
by msuess
It works. Thank You!