I'd like to propose two small changes to the breadcrumbs plugin source. One is a code optimization in the HTML generating loop. The other is an enhancement to support a simple form of "ambient signifiers" using "enumerated" CSS classes for "non-current" breadcrumbs. I've attached a file containing the proposed changes (to cmsms 1.6.5, in "patch" format).
The optimization replaces two "if" statements inside the HTML output loop with one "if" statement outside of the loop.
The enhancement adds a boolean 'enumerate' parameter. When true, each (non current page) breadcrumb will be given a CSS class that is distinct from the others. Specifically, a numeric suffix will be appended to the classid of each breadcrumb. The further away from the current page, the greater the numeric value. This is trivially implemented using the readily available loop index variable, $i. Finally, if classid is not specified when enumerate is true, the class name "crumb" is used as a default.
Here is one example of how this might be used; given:
Code: Select all
{breadcrumbs starttext='You are here' root='Home' delimiter='>>' enumerate=1}
Code: Select all
#breadcrumbs span.lastitem {
font-size: 100%;
}
#breadcrumbs a.crumb_1 {
font-size: 95%;
}
#breadcrumbs a.crumb_2 {
font-size: 90%;
}
#breadcrumbs a.crumb_3 {
font-size: 85%;
...
You are here: Home >> Census Data >> 1850
Where:
Home crumb:Home Census Data crumb:Census Data 1850 crumb:1850
Hope this is helpful,
Fred