[themes] Is there a better way to do this? (by "this", I mean
include javascript commands in the body of a page that change in
response to page.tpl.php variables)
Mark Fredrickson
mfredrickson at ppmns.org
Thu Feb 2 22:53:11 UTC 2006
>>
>> if ($is_front) { }
>>
>> global $user;
>> if ($user->uid > 0) { }
>>
> Ah yes -- but you see this is a theme that I intend to release
> publically, so I have to use non-site-specific variables (e.g. the
> navigation block appearing on the left only for users).
Why are these variables site specific? $is_front is created by PHPTemplate,
and I don't have to tell you where $user comes from.
Are you trying to define a "region"? 4.7 has these. Your theme could define
a bunch of different regions and you could test
If ($region1) {}
If ($region2) {}
... Etc
I guess I'm not understanding the problem.
-M
More information about the themes
mailing list