$view== ?

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

$view== ?

Post by carl_galloway »

Hi guys, I want to use the $view variable to determine if the user is requesting a static page, is this possible?

My reason for asking is that the Hemingway template reuires quite a lot of html/css formatting to appear outside of the regular {foreach} loops in entries.tpl, so ideally I'd like to bypass entries.tpl altogether and go directly to the static pages .tpl files from index.tpl

BTW, Hemingway is coming along very nicely, and I hope to upload a demo version on one of my blogs over the next couple of days.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: $view== ?

Post by garvinhicking »

Hi!

No, the $view parameter has not been implemented in the staticpage plugin. You would need to check some other variable like $staticpage_content instead to check if a staticpage is displayed...
BTW, Hemingway is coming along very nicely, and I hope to upload a demo version on one of my blogs over the next couple of days.
Wow, that's awesome news. I'm curious as hell :)

Best 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/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

ok, that's cool, I can do that. Does that also work with the guestbook, contact form, forums etc. These plugins all take control of the page just like the static pages plugin, and I need to make sure thay are all supported.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Carl!

Many of the other plugins use the "staticpage_pagetitle" variable, you might want to check that? I also think that a $view variable gets set for all external plugin hooks ($view == external or sth like that) which you might want to use?

Best 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/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

the $staticpage_pagetitle works best, but what a lot of customising I have to do. Once Hemingway is complete you'll see what I mean, then it might be an idea to take a fresh look at how the plugins use those variables, and perhaps enforce some sort of standard.

The $view == "external" did kind of work, but it seems to ignore the config colorsets. Now sure how else it works but more documentation on the $view variable would be awesome.
Post Reply