Create a breadcrumb block?

Permalink
Hi all,

Now I've got a question but it requires quite a detailed description, so hold on to your hats!

Right, for the main navigation on my site I wanted to use Superfish so that I get Suckerfish-like dropdowns for my sub-pages. In order to include the <ul class="superfish"> code in the autonav block I'm using for the navigation I created my own view.php file for that block which I placed in a new autonav folder I created in the block folder at the root of the site.

All was well, the navigation works great, cue big smile!

That was until I wanted to add a site-wide breadcrumb trail.

I've added another autonav block to the relevant page type but of course it's picking up my altered view.php for the autonav block and styling the breadcrumb as it would the main navigation, complete with dropdowns - eek!

I've enclosed my breadcrumb within a <div> in the template so that I could style it appropriately, but that doesn't eliminate the dropdown effect that I don't want.

What would be the best way forward?

Is it to create my own custom block (called breadcrumb perhaps) and basically copy all the default files from the autonav block to it?
This is the solution that comes to mind, but is it the best?

Hope this all makes some kind of sense.

I'm slowly getting to grips with C5, but I'd still classify myself as a newbie!

Thanks in advance,
Tony.

 
katz515 replied on at Permalink Reply
katz515
Maybe, what you want to do as breadcrumb may be different. But here you go...


How to: Add Breadcrumb Navigation to your Concrete5 Site
http://c5mix.com/tutorials/how-to-add-breadcrumb-navigation-to-your...
Fluvius replied on at Permalink Reply
Thanks for the link katz515, but the problem I'm having is due to the fact that I created my own view.php file for the autonav block.

For example, line 5 of the default view.php file inside the concrete/blocks/autonav folder is as follows:
echo("<ul class=\"nav\">");


When I created my own view.php file I changed this line to:
echo("<ul class=\"sf-menu\">");


This is so that the Superfish javascript and stylesheet can pick up the navigation list and work with it.

Now that I want to create another autonav block on each page for a breadcrumb trail, c5 is picking up my altered view.php file and styling it with the sf-menu class too, so the breadcrumb is acting like a navigation bar instead of a breadcrumb.

I hope this explains it a bit better.

What's the best way to get around this problem?

Tony.