Styling Breadcrumb navigation

Permalink
Hi!

I have a small problem with my sidebar navigation based on breadcrumb template. Since currenty active link is just plain text i would need to add some CSS class to it so it would look the same as all other links. The problem i that i cant add any margin-bottom to text without any CSS class. Here is the PHP code for navigation, could someone please point me the spot where active link-text is printed and tell me how to add for example <span class="sidebar_active> </span> to it? :)

Thanks!

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

$pageLink = false;

$target = $ni->getTarget();
if ($target != '') {
$target = 'target="' . $target . '"';
}

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 . '" ' . $target . '>' . $ni->getName() . '</a>');
}
$lastLevel = $thisLevel;
$i++;
}

$thisLevel = 0;

1 Attachment

 
ronyDdeveloper replied on at Permalink Best Answer Reply
ronyDdeveloper
It seems like the text which doesn't have link on it is an active menu. so I think the code is here
if ($c->getCollectionID() == $_c->getCollectionID()) { 
echo('<span class="active_class">'.$ni->getName().'</span>'); ......  Need to add class here
}


Rony
Onslow replied on at Permalink Reply
Thanks, works fine! :)
Onslow replied on at Permalink Reply
Could you please tell me also how can i enable "exclude from navigation" option for this template?

Thanks.