unique condition for static start page?

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

unique condition for static start page?

Post 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)?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: unique condition for static start page?

Post 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. :-)
# 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/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: unique condition for static start page?

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

Re: unique condition for static start page?

Post by garvinhicking »

Hi!

Hm, shouldn't a combination of:

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

maybe do that trick?

Regards,
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/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: unique condition for static start page?

Post 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.
=Don=
Post Reply