Identify static pages

Creating and modifying plugins.
Post Reply
msuess
Regular
Posts: 27
Joined: Tue Jan 08, 2008 9:53 pm
Location: Schwandorf
Contact:

Identify static pages

Post 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.
Rel=me seo.ms
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Identify static pages

Post 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
# 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/
msuess
Regular
Posts: 27
Joined: Tue Jan 08, 2008 9:53 pm
Location: Schwandorf
Contact:

Re: Identify static pages

Post by msuess »

It works. Thank You!
Rel=me seo.ms
Post Reply