[support] Themed frontpage without $sidebar_right

Larry Garfield larry at garfieldtech.com
Mon Mar 12 15:00:21 UTC 2007


Just check the $is_front variable, which is set on any page.tpl.php (or derivative) template.  That's much more stable than checking the URL directly.  

Alternatively, use page-front.tpl.php, which automatically gets used for the front page in place of the normal page.tpl.php.  Then simply omit the $sidebar_right statement entirely.

--Larry Garfield

On Mon, 12 Mar 2007 15:16:53 +0100, "Mattias Hällkvist" <mattiasha at gmail.com> wrote:
> I'm trying to set different front page for anonymous and authenticated
> users
> using the front page module <http://drupal.org/project/front>. I'd like
> the
> frontpage to have the header but not the right sidebar. In page.tpl.php
> the
> right sidebar is defined as $sidebar_right. So I thought that I could add
> code to check if the url is domain.com/front_page and then not print
> $sidebar_right. Or some other solution that doesn't print the right
> sidebar
> on the front_page.
> 
> I'm a php novice but I'm learning.. I appreciate any help I can get.
> 
> Thanks!
> /Mattias
> 
> 



More information about the support mailing list