Breadcrumbs
PermalinkThanks.
my sitehttp://www.sweetsodypop.com
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
$aBlocks = $controller->generateNav();
$c = Page::getCurrentPage();
$nh = Loader::helper('navigation');
$i = 0;
foreach($aBlocks as $ni) {
$_c = $ni->getCollectionObject();
if (!$_c->getCollectionAttributeValue('exclude_nav')) {
$pageLink = false;
if ($_c->getCollectionAttributeValue('replace_link_with_first_in_nav')) {
$subPage = $_c->getFirstChild();
if ($subPage instanceof Page) {
$pageLink = $nh->getLinkToCollection($subPage);
}
}
if (!$pageLink) {
$pageLink = $ni->getURL();
}
if ($i > 0) {
print ' <span class="ccm-autonav-breadcrumb-sep">></span> ';
}
if ($c->getCollectionID() == $_c->getCollectionID()) {
echo($ni->getName());
} else {
echo('<a href="' . $pageLink . '" ' . $ni->getName() . '</a>');
}
$lastLevel = $thisLevel;
$i++;
}
}
$thisLevel = 0;
<style> .breadcrumb { font-variant:small-caps; } </style> <?php defined('C5_EXECUTE') or die(_("Access Denied.")); $aBlocks = $controller->generateNav(); $c = Page::getCurrentPage(); $nh = Loader::helper('navigation'); $i = 0; foreach($aBlocks as $ni) { $_c = $ni->getCollectionObject(); if (!$_c->getCollectionAttributeValue('exclude_nav')) { $pageLink = false;
the things I changed is:
print ' <span class="ccm-autonav-breadcrumb-sep">></span> ';
to
print ' <span class="ccm-autonav-breadcrumb-sep"> </span> ';
and then I just put a class into :
echo('<a class="breadcrumb" href="' . $pageLink . '">' . $ni->getName() . '</a>');
finally I added styles to the breadcrumb class:
<style> .breadcrumb { font-variant:small-caps; } </style>
you can style it as you want, but I suggest you put the styles in you overall css, as it is not valid code to have <style> elements in body :-)
hope it helps :-)
Thanks again.
glad I could help..!
you can change the breadcrumb nav as you want, by copying the file your_root/concrete/blocks/autonav/templates/breadcrumb.php
to
your_root/blocks/autonav/templates/breadcrumb.php
then you just change this file as you want... and if something goes very wrong, you can just delete the file and start all over
Hope that helps :-)