Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm working on a style plugin for lineage that would allow terms to be nested indefinitely based on their lineage. I propose including this as a part of the lineage module since it would be a useful and expected feature for using lineage with views. References and related issues:
Views:
#502348: How group display by mutliple fields?
Views bonus pack:
#346324: Upgrade Lineage Nested to D6
Lineage:
#555316: Views 2: Improve field handler
#507472: Fix weight string handling for D6
Related forum topic:
http://drupal.org/node/435542
I will attach a patch with the style plugin once I am done with it.
Comment | File | Size | Author |
---|---|---|---|
#7 | lineage-612908-7.patch | 6.59 KB | xjm |
Comments
Comment #1
Flying Drupalist CreditAttribution: Flying Drupalist commentedSubscribe
Comment #2
fm CreditAttribution: fm commentedsubscribe
Comment #3
joel_guesclin CreditAttribution: joel_guesclin commentedMaybe one could achieve something similar by using the Semantic Views module?
Comment #4
xjmI'm not sure that semantic views would do the trick, since the entire grouping structure of the list needs to be overridden (rather than just the row style) and furthermore needs to include some recursion. It could be that I just don't know how to use that module effectively. If you get it working with that module, could you post a recipe?
Comment #5
xjmStatus update--I have this functionality mostly working and I should have a patch available for testing within the 10 days. However, #699198: Add lineage_strip_weights() and refactor field handler to use this function should go in first and will affect the style plugin's methods, so I'm marking this "postponed" pending that change.
Comment #6
xjmComment #7
xjmHere's a patch implementing this feature (finally).
Suggested use:
Note: Patch includes multiple files and is therefore rolled at the directory level, so use the -p option to apply it.
Comment #8
xjmCommitted to dev branch.
Comment #9
xjmComment #11
mediamash CreditAttribution: mediamash commentedworks fine, only seems to give some ajax-errors when enabled
Comment #12
xjmWhat sorts of errors are you getting? What steps can be taken to reproduce these errors?
Comment #13
xjmComment #14
stinky CreditAttribution: stinky commentedAfter running the patch I get the following error msg
:Fatal error: Cannot redeclare lineage_get_weight() (previously declared in /var/www/html/sled/modules/lineage/lineage.module:252) in /var/www/html/sled/modules/lineage/lineage.module on line 278:
Comment #15
xjmYou shouldn't need to apply the patch; the feature is already committed. Just use the latest dev build.
A separate issue should be opened for the ajax errors (@#11).