update
This commit is contained in:
37
core/plugins/Smarty/function.generateHeaders.php
Normal file
37
core/plugins/Smarty/function.generateHeaders.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*
|
||||
* Smarty plugin
|
||||
* -------------------------------------------------------------
|
||||
* File: function.generateHeaders.php
|
||||
* Type: function
|
||||
* Name: link
|
||||
* Purpose: zwraca naglowki
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
function smarty_function_generateHeaders($params, &$smarty){
|
||||
|
||||
$headers = $smarty->get_template_vars('pageHeaders');
|
||||
$return = null;
|
||||
|
||||
foreach($headers as $type=>$header) {
|
||||
if($header!=null) {
|
||||
|
||||
foreach($header as $headerItem) {
|
||||
$return .= "<".$type." ";
|
||||
foreach($headerItem as $var=>$val) {
|
||||
$return .=$var."=\"".$val."\" ";
|
||||
}
|
||||
$return .="/>
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//print_r($headers);
|
||||
|
||||
return $return;
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user