cvs: phpweb /include layout.inc

From: Date: Mon, 19 Feb 2007 23:53:02 +0000
Subject: cvs: phpweb /include layout.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-34389@lists.php.net to get a copy of this message
bjori Mon Feb 19 23:53:02 2007 UTC Modified files: /phpweb/include layout.inc Log: Make it possible to distinguish more accurately between layouts http://cvs.php.net/viewvc.cgi/phpweb/include/layout.inc?r1=1.260&r2=1.261&diff_format=u Index: phpweb/include/layout.inc diff -u phpweb/include/layout.inc:1.260 phpweb/include/layout.inc:1.261 --- phpweb/include/layout.inc:1.260 Wed Feb 14 14:52:00 2007 +++ phpweb/include/layout.inc Mon Feb 19 23:53:02 2007 @@ -1,5 +1,5 @@ <?php -/* $Id: layout.inc,v 1.260 2007/02/14 14:52:00 bjori Exp $ */ +/* $Id: layout.inc,v 1.261 2007/02/19 23:53:02 bjori Exp $ */ // Set the static content root differently on php.net $_SERVER['STATIC_ROOT'] = ($MYSITE == 'http://www.php.net/') ? @@ -126,6 +126,13 @@ $moreheadtags = "\n " . ((string)$config['headtags']); } } + $classname = "default"; + if(isset($_SERVER['BASE_PAGE'])) { + $classname = dirname($_SERVER['BASE_PAGE']); + if(empty($classname)) { + $classname = "default"; + } + } print <<<END_HEADER <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" @@ -214,7 +221,7 @@ } // Start main page content - echo "\n <div id=\"content\">\n"; + echo "\n <div id=\"content\" class=\"$classname\">\n"; } // Stats pages still need this

« previous php.mirrors (#34389) next »