Identify static pages

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

Identify static pages

Post by msuess » Fri Oct 05, 2012 9:18 am

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

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Identify static pages

Post by garvinhicking » Fri Oct 05, 2012 10:07 am

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/

User avatar
msuess
Regular
Posts: 27
Joined: Tue Jan 08, 2008 10:53 pm
Location: Schwandorf
Contact:

Re: Identify static pages

Post by msuess » Fri Oct 05, 2012 11:06 am

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

Post Reply