If I understand this correctly, because the README file isn't very clear and the module won't work for me for some reason, this module uses the URL (server path) to define sections? Right? Well, why not, like many others have suggested, use taxonomy terms? Create a sections vocabulary and tag the nodes with terms from that tree. You could then apply "sections" to the branches of term tree. This is what I need for my site. I have a part of the site called Articles, with a subsection called Tutorials, which has yet another subsection called CSS. My vocab might look like this:
> Portfolio
> Articles
-> Tutorials
--> CSS
--> Dreamweaver
-> Rants and raves
> Downloads
-> DreamweaverI need to define sections to set CSS classes dynamically, to set background images depending on where the user is. I can do this now on a per-term basis but I has one fault, there's no way of telling whether the user is in Downloads>Dreamweaver or in Articles>Tutorials>Dreamweaver. So if I could just mark a branch of terms, tag them as a section and then give that section a name, and print that string in page.tpl.php, to assign the right CSS class to an element, that would solve it.
Either way, I've found a solution that works for me, it ain't pretty but it does the job:
<?
$bctrail = drupal_get_breadcrumb();
print strip_tags(implode(' | ', $bctrail));
?>This gives me the breadcrumb trail without the HTML, enough to custom a CSS class. I'm sure there's a prettier way to do it tho.
Comments
Comment #1
Bèr Kessels commentedhttp://drupal.org/node/12981