Skip to content
Snippets Groups Projects
Commit e3d4d2c1 authored by Tim Steiner's avatar Tim Steiner
Browse files

Add a bodyClasses parameter to the WdnTemplates view helper.

parent 5c0a60ed
No related branches found
No related tags found
No related merge requests found
...@@ -51,6 +51,10 @@ class Unl_View_Helper_WdnTemplate extends Zend_View_Helper_Abstract ...@@ -51,6 +51,10 @@ class Unl_View_Helper_WdnTemplate extends Zend_View_Helper_Abstract
'href' => $staticBaseUrl, 'href' => $staticBaseUrl,
'title' => $layout->siteTitle)); 'title' => $layout->siteTitle));
if (!is_array($layout->bodyClasses)) {
$layout->bodyClasses = array();
}
require_once 'UNL/Templates.php'; require_once 'UNL/Templates.php';
require_once 'UNL/Templates/CachingService/Null.php'; require_once 'UNL/Templates/CachingService/Null.php';
UNL_Templates::setCachingService(new UNL_Templates_CachingService_Null()); UNL_Templates::setCachingService(new UNL_Templates_CachingService_Null());
...@@ -166,6 +170,10 @@ EOF; ...@@ -166,6 +170,10 @@ EOF;
} }
$template->footercontent .= '</script>' . PHP_EOL; $template->footercontent .= '</script>' . PHP_EOL;
foreach ($layout->bodyClasses as $bodyClass) {
$template->__params['class']['value'] .= " $bodyClass";
}
$html = $template->toHtml(); $html = $template->toHtml();
return $html; return $html;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment