update
This commit is contained in:
30
core/plugins/Smarty/function.breadCrumbs.php
Normal file
30
core/plugins/Smarty/function.breadCrumbs.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/*
|
||||
* Smarty plugin
|
||||
* -------------------------------------------------------------
|
||||
* File: function.breadCrumbs.php
|
||||
* Type: function
|
||||
* Name: link
|
||||
* Purpose: zwraca breadcrumbs w htmlu
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
function smarty_function_breadCrumbs($params, &$smarty){
|
||||
|
||||
$input = $smarty->getTemplateVars('breadCrumbs');
|
||||
//Utils::ArrayDisplay($input);
|
||||
$return = array();
|
||||
if(is_array($input)) {
|
||||
foreach($smarty->getTemplateVars('breadCrumbs') as $row) {
|
||||
if($row['url']!='') {
|
||||
$return[] = " <a href=\"".$row['url']."\" title=\"".$row['title']."\">".$row['title']."</a> ";
|
||||
}else {
|
||||
$return[] = " ".$row['title']." ";
|
||||
}
|
||||
}
|
||||
|
||||
return implode( ' > ', $return);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user