From: Tara S. <te...@cl...> - 2001-11-16 16:19:00
|
Is there a variable, that I can use in control statements in the=20 template pages, and whose value is the name of the current page? I'm preparing a private wiki in which I'm going to allow certain pages=20 to be visible to the public. I'm doing it (rather clumsily, I'll admit)=20 by putting the whole page display into a control statement, like this: if ($user->is_admin() || array_search($pagename, $public_pages)) { show the page } else { log in, please } I've gone through Template.php as well as I can, I've tried just using=20 "$pagename", but it's obviously not it. Is there a variable somewhere I can use in the templates to check if the=20 name of the current page is in my $public_pages array? Thanks :) Tara PS - btw, I've solved my not-so-mod_rewrite problems. See=20 http://spirolattic.net/ for the result :) --=20 Je r=E9ponds au mieux de mes connaissances Climb to the Stars! - http://climbtothestars.org/ SpiroLattic - http://climbtothestars.org/spiro/ Pompeurs Associ=E9s - http://pompage.net/ |