Download & Extend

Add lineage nested list style plugin

Project:Taxonomy Lineage
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:xjm
Status:closed (fixed)

Issue Summary

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.

Comments

#1

Subscribe

#2

subscribe

#3

Maybe one could achieve something similar by using the Semantic Views module?

#4

I'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?

#5

Status:active» postponed

Status 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.

#6

Status:postponed» active

#7

Status:active» needs review

Here's a patch implementing this feature (finally).

Suggested use:

  1. Add a Taxonomy: Hierarchy field.
  2. Add your hierarchy field as a sort criterion.
  3. Filter your view by Taxonomy: Vocabulary as your hierarchical vocabulary.
  4. Change the view style to Lineage nested list and set the Nesting field to your hierarchy field.

Note: Patch includes multiple files and is therefore rolled at the directory level, so use the -p option to apply it.

AttachmentSize
lineage-612908-7.patch 6.59 KB

#8

Committed to dev branch.

#9

Status:needs review» fixed

#10

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#11

Status:closed (fixed)» needs work

works fine, only seems to give some ajax-errors when enabled

#12

What sorts of errors are you getting? What steps can be taken to reproduce these errors?

#13

Status:needs work» postponed (maintainer needs more info)

#14

After 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:

#15

Status:postponed (maintainer needs more info)» closed (fixed)

You 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).

nobody click here