<?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);
    }
}
?>