Page 1 of 1

unique condition for static start page?

Posted: Mon Jun 20, 2011 10:27 pm
by Don Chambers
Do we have a unique condition to test for a static start page (ie, a static page is flagged as the start page of s9y)?

Re: unique condition for static start page?

Posted: Thu Jun 23, 2011 12:02 am
by garvinhicking
Don Chambers wrote:Do we have a unique condition to test for a static start page (ie, a static page is flagged as the start page of s9y)?
Where do you want to test it for?

Short answer: No.

long answer: We could add a smarty modifier or function call to the staticpage plugin though, if you can explain more in depth what you need. Should be easy. :-)

Re: unique condition for static start page?

Posted: Thu Jun 23, 2011 3:59 am
by Don Chambers
we have conditions such as these:

$startpage =='true', $view == 'start', $staticpage_pagetitle == ''.... what I would like is something that identifies it as a static start page... a unique condition. I can do it in a template very easily with something like $staticpage_custom.start_page... and perhaps that is the route I should take if no one thinks there is value to something template independent.

Re: unique condition for static start page?

Posted: Fri Jun 24, 2011 1:02 am
by garvinhicking
Hi!

Hm, shouldn't a combination of:

{if $static_pagetitle != '' AND $view == 'start'}

maybe do that trick?

Regards,
Garvin

Re: unique condition for static start page?

Posted: Fri Jun 24, 2011 3:56 am
by Don Chambers
garvinhicking wrote:Hi!

Hm, shouldn't a combination of:

{if $static_pagetitle != '' AND $view == 'start'}

maybe do that trick?

Regards,
Garvin
Yeah, I thought of that already, but its not working... in my test, a static page marked as the s9y start page, $view = plugins, and $startpage = false. At minimum, something should be changed so that static start pages also emit $startpage = true. $view = start might also be a good thing, but maybe there was some reason that "plugins" was a better choice.

I actually did discover (thanks to {$debug}) that there is this available: $staticpage_is_startpage, but if I try to use this: if $staticpage_is_startpage=='true' (with or without also testing the static page title), that logic only works when actually hitting the static page URL. I need something that works in index.tpl.

EDIT: I don't think anything special is required..... after much experimentation, it seems that the static page as a start page will work, but the static page plugin must be early in the event queue, in my test it has to exist before the extended properties event plugin.