28 lines
694 B
PHP
28 lines
694 B
PHP
<?php
|
|
|
|
function st_navigation_breadcrumbs()
|
|
{
|
|
$breadcrumbs = stNavigationBreadcrumbs::getInstance();
|
|
|
|
$content = '';
|
|
|
|
$last = count($breadcrumbs) - 1;
|
|
|
|
foreach ($breadcrumbs->getBreadcrumbs() as $index => $breadcrumb)
|
|
{
|
|
$title = strip_tags($breadcrumb->getTitle());
|
|
|
|
if ($breadcrumb->isLink() && $index < $last)
|
|
{
|
|
$item = content_tag('a', $title, array('href' => $breadcrumb->getUrl()));
|
|
}
|
|
else
|
|
{
|
|
$item = content_tag('span', $title);
|
|
}
|
|
|
|
$content .= content_tag('li', $item);
|
|
}
|
|
|
|
return $content ? content_tag('ul', $content, array('class' => 'st-navigation-breadcrumbs')) : '';
|
|
} |