Breadcrumbs

Permalink
How do I change the breadcrumbs so they are evenly spaced across the page. I want the > deleted between each. I tried entering my own css code under the design tab but that didn't work.

Thanks.

my sitehttp://www.sweetsodypop.com

 
pixel8 replied on at Permalink Reply
pixel8
Hi,

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 :-)
Sodypop replied on at Permalink Reply
Thank you so much. I did a copy and paste and still managed to mess it up! Can you look at my coding here and tell me what is incorrect? I just want bold capitalized breadcrumbs horizontally across the page with only space as dividers. I really appreciate it.


<?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">&gt</span> ';
}
if ($c->getCollectionID() == $_c->getCollectionID()) {
echo($ni->getName());
} else {
echo('<a href="' . $pageLink . '" ' . $ni->getName() . '</a>');
}
$lastLevel = $thisLevel;
$i++;
}
}

$thisLevel = 0;
pixel8 replied on at Permalink Best Answer Reply
pixel8
Okay, here it is.:

<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">&gt;</span> ';


to

print ' <span class="ccm-autonav-breadcrumb-sep">&nbsp;</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 :-)
Sodypop replied on at Permalink Reply
You're amazing. Thank you Thank you! I took one tiny piece out and should've been more careful. I've been working on it for several hours and nothing. I appreciate your quick response! I'll style it in the morning. I'm happy with today's progress now that this is solved.

Thanks again.
pixel8 replied on at Permalink Reply
pixel8
you're welcome :)

glad I could help..!