Attached patch provides a hook that node modules can use to override the behavior of taxonomy_render_nodes() when displaying terms from a single vocabulary that applies to only one node type. (i.e. a vocabulary that applies to images only could be rendered with a gallery page instead of the standard node teaser formatting.)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | taxonomy.module_9.patch | 1.01 KB | Eric Scouten |
| taxonomy_render_nodes_hook.patch | 605 bytes | Eric Scouten |
Comments
Comment #1
pfaocleBrilliant! This should achieve whats brought up in this issue: http://drupal.org/node/23782
Comment #2
Eric Scouten commentedSorry... wrong patch format before.
Comment #3
pfaocleJust been trying out this patch, to no avail: patched taxonomy.module, created an image_render_nodes() function in a test image.module to override the default output... is there a last step? Eg:
will the $vid now need to be passed to taxonomy_render_nodes() for this to work?
Apologies if I missed something.
Comment #4
Eric Scouten commentedActually, there are probably two more pieces to make this fully work, so I'll take this back to the drawing board.
(1) Yes, a vid needs to be passed to taxonomy_render_nodes() if the call comes from within taxonomy.module. Otherwise, this patch is a no-op.
(2) taxonomy_menu.module needs to be patched to pass the vid when it calls this function. That's a separate patch that I'll need to submit. That gets complicated for me since I have several other patches in the queue for that module.
I'll work on an updated patch. ETA: later this week. Worst case: Sunday evening.
Comment #5
ricabrantes commentedbump.
Comment #6
ricabrantes commentedComment #7
catchtaxonomy_render_nodes() has completely vanished in Drupal 7, you can do everything needed here with hook_page_alter() hook_menu_alter() hook_term_path() or various other options.