An overview of Taxonomy Treemenu options
In tables.
INCOMPLETE: a work in progress! *** Probably not correct *** (but a start).
For most design purposes the following tables can be reduced to one decision,
-
If you want some block menus, either rendered as treemenus or through Views, use the default setup (stock Drupal URLs).
-
If you can live with duplicating aliases, not using aliases, or shifting your site entirely to extended URLs,
then extended URLs will offer some cool features, such as whole menu styling, multiple breadcrumbs, and backtracking into paged menus.
Menu general options
menu type |
menu on a page |
expanding menus |
show nodes |
structure nodes in menu |
reflect node structure in term lists |
reflect node paths in term lists |
|
|
yes |
no |
yes |
yes |
no |
yes |
|
|
yes |
no |
yes |
yes |
yes |
almost |
|
-
The internal renderer will carry extended URLs in the term list.
Stock term lists would need a site-wide hook_link_alter().
Treemenus and other APIs
For further information on the path alias issue, see
custom URLs
menu type |
Pathauto and aliases |
Views |
Views for menu terms |
|
|
yes |
yes |
no |
|
|
with work |
yes |
almost |
|
-
Views works as usual, but has a (much used) default template which can deliver a treemenu's nodes.
-
Pathauto aliases will be need to be duplicated if you use simple paths also on your site.
-
Treemenus can use Views for term paging, but currently only from stock, not extended, URLs.
Breadcrumbs
Building breadcrumbs is more difficult than intuition suggests.
They become tricky for multiple heirachy menus, see
multiple hierarchy ambiguity.
Even core Drupal builds breadcrumbs by retrieving menu data (a cached 'tree'), and rebuilding.
So breadcrumb options have some complex interactions.
menu type |
crumb terms |
crumb nodes |
multiple crumbs |
block crumb backtrack |
page crumb backtrack |
|
|
stock |
minimal |
no |
stock |
no |
|
|
almost |
almost |
with work |
yes |
minimal |
|
-
The crumb for terms and nodes is stock, i.e. the taxonomy heirarchy, and nothing.
Nodes carry taxonomy data, so a page preprocesser can do some work there (as it could in any Druapl installation).
-
Block crumb backtracking is the taxonomy heirarchy.
No understanding of Taxonomy menus (so could get very confused with multiple parentage).
-
Discovering the menu name of a term or node is a heavy recursive operation, so no (though, yes, it is possible).
-
Can't crumb terms or nodes on multiple parentage. Crumb will revert to 'home'.
-
Multiple breadcrumbs yes, but a designer needs to redesign the site page template,
or there is no area for the breadcrumbs. The stock result is unacceptable.
-
Paged menus have an option to set the crumb to the base menu?
Various forms of styling
menu type |
use the internal term theme |
style menus |
style terms by taxonomy |
style nodes by taxonomy |
|
|
no |
no |
alternative |
with work |
|
|
yes |
yes |
with work |
with work |
|
-
Stock URLs could use the internal theme, but would need hook_link(), hook_term_path(), or some (module driven?) redirection.
Most folks would probably choose to use Views.
-
Using a page preprocessor, a designer can call taxonomy_treemenu_get_tid_ancestry() to discover term heirarchy.
-
Using a page preprocessor, a designer can call taxonomy_treemenu_get_tid_ancestry() to discover term and node taxonomy.
Credit for blatant theft: Styling lifted from http://www.quirksmode.org.
Everything you need to know about browser DOMs and CSS (well, there's also the HTML4 spec and WC3).