Breadcrumbs

Permalink Browser Info Environment
If this is a general C5, my apologies for posting here. I searched in the general C5 site, but couldn't find quite the answer I need.

How do you not display the current page in the breadcrumb trail? I have some long page names and the breadcrumbs are pushing the page title in the main content area to multiple lines.

I see the AutoNav in the pagemeta.php, but am not sure what to put. Another option would be to give the breadcumb the full page width above the main content area. Still trying to figure that out as well.

Any help would be much appreciated. Thanks.

Tim

Type: Discussion
Status: New
DBKG
View Replies:
c5mix replied on at Permalink Reply
c5mix
Hmm, not sure how to not have the current page display. But to make the breadcrumb area full width, in the theme's main.css file remove the float:right property from #breadcrumbs and then just add text-align:right if you still want them aligned right.
dforst replied on at Permalink Reply
dforst
Create a custom breadcrumb template (copy concrete/blocks/autonav/templates/breadcrumb.php over to root/blocks/autonav/templates/breadcrumb.php, maybe rename it something like "no_title_breadcrumb.php" or something).

Towards the bottom of that php file, find this output code:

if ($c->getCollectionID() == $_c->getCollectionID()) { 
         echo($ni->getName());
      } else {
         echo('<a href="' . $pageLink . '" ' . $target . '>' . $ni->getName() . '</a>');
      }


Change it to this:

if ($c->getCollectionID() == $_c->getCollectionID()) { 
         echo('');
      } else {
         echo('<a href="' . $pageLink . '" ' . $target . '>' . $ni->getName() . '</a>');
      }


Basically, all you did was tell it to print nothing instead of the current page name.

If what you really want is to display the breadrumb nav and then the page title right below it in a big <h1> or <h2> style, then try something like this:

if ($c->getCollectionID() == $_c->getCollectionID()) { 
         ?><h1 class="breadcrumb-pagetitle"><?php echo($ni->getName());?></h1><?php
      } else {
         echo('<a href="' . $pageLink . '" ' . $target . '>' . $ni->getName() . '</a>');
      }


This way is the least intrusive I can think of. You can add a class or two to the <a> css as well and really get it where you want.

D

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.