Modified:
trunk/themes/head.php
Log:
A bit of improvements and consistency
Modified: trunk/themes/head.php
==============================================================================
--- trunk/themes/head.php (original)
+++ trunk/themes/head.php Sun Sep 30 14:04:49 2007
@@ -6,36 +6,36 @@
<head>
<title>'.$this->Context->Configuration['APPLICATION_TITLE'].' - '.$this->Context->PageTitle.'</title>
<link rel="shortcut icon" href="'.$this->Context->StyleUrl.'favicon.ico" />';
-
- while (list($Name, $Content) = each($this->Meta)) {
+
+ foreach ($this->Meta as $Name => $Content) {
$HeadString .= '
<meta name="'.$Name.'" content="'.$Content.'" />';
}
-
+
if (is_array($this->StyleSheets)) {
- while (list($Key, $StyleSheet) = each($this->StyleSheets)) {
+ foreach ($this->StyleSheets as $StyleSheet) {
$HeadString .= '
<link rel="stylesheet" type="text/css" href="'.$StyleSheet['Sheet'].'"'.($StyleSheet['Media'] == ''?'':' media="'.$StyleSheet['Media'].'"').' />';
}
}
if (is_array($this->Scripts)) {
- $ScriptCount = count($this->Scripts);
- $i = 0;
- for ($i = 0; $i < $ScriptCount; $i++) {
+ foreach ($this->Scripts as $script) {
$HeadString .= '
- <script type="text/javascript" src="'.$this->Scripts[$i].'"></script>';
+ <script type="text/javascript" src="'.$script.'"></script>';
}
}
-
+
if (is_array($this->Strings)) {
$StringCount = count($this->Strings);
- $i = 0;
for ($i = 0; $i < $StringCount; $i++) {
$HeadString .= $this->Strings[$i];
}
}
$BodyId = "";
-if ($this->BodyId != "") $BodyId = ' id="'.$this->BodyId.'"';
+if ($this->BodyId != "") {
+ $BodyId = ' id="'.$this->BodyId.'"';
+}
+
echo $HeadString . '</head>
<body'.$BodyId.' '.$this->Context->BodyAttributes.'>
<div id="SiteContainer">';