Page 1 of 1

$view== ?

Posted: Fri Sep 01, 2006 6:05 am
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.

Re: $view== ?

Posted: Fri Sep 01, 2006 10:07 am
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

Posted: Fri Sep 01, 2006 7:24 pm
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.

Posted: Sat Sep 02, 2006 12:18 pm
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

Posted: Sat Sep 02, 2006 9:11 pm
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.