The Lineage-View in the Views Bonus Pack is a great idea!
However, doesn't it make much more sense/be of more value to have this module adding a sortable field to the views rather than just the present, fixed "sort criteria" (which by now can't be altered/toggeled/reversed by the user)?!
Since i'm really not familiar with the Views API (yet), i can't do it by myself, but perhaps it's no big task for one of the module's authors, who knows?
A secondary feature would be that this sortable field can be toggled to be padded with spaces/  to reflect the taxnonomy term's level of depth.

CommentFileSizeAuthor
#2 lineage_viewfield.patch1.17 KBdanielnolde

Comments

danielnolde’s picture

Project: Views Bonus Pack » Taxonomy Lineage
Version: 4.7.x-1.x-dev »

Just realized (by code-review :):
This feature request - http://drupal.org/node/93249 - belongs to the "Taxonomy Lineage" module rather than the views bonus pack...

danielnolde’s picture

Title: Lineage-View: Sortabe Field instead of "sort criteria"? » Lineage-View gets Sortabe Field in addition to "sort criteria"
Component: Miscellaneous » Code
Assigned: Unassigned » danielnolde
Status: Active » Needs review
StatusFileSize
new1.17 KB

After a few hours with the views API (my first time <:) and lineage module, i managed to get my requested feature for the lineage module's views support - Sortabe Field instead of "sort criteria" - into the attached patch (my first time patch, too :), which works nice with my 4.7 install and now needs review by fellow drupal coders/users.

After installing the patch (paths relative to drupal-root!), you should be able to add a field "Lineage: Taxonomy Hierarchy" to a view with the following features:
- terms get outputted (oookay ... ;)
- hierarchically indented (hm.. )
- the view is now sortable by th taxonomy's hierarchy :))
- you can hover over each term and get the term's full hierarchical path in a nicely redable way

Any more useful features this patch could integrate?

Oh ... and please review this patch and then (@module maintainer) please commit it, it's really useful :)

cheers,

daniel

danielnolde’s picture

The above path adds a "Lineage: Taxonomy Hierarchy" field to views, which makes the view sortable asc/desc by taxonomy hierarchy and displays the former, showing the terms hierarchically indented and the term's full hierarchy-path on rollover. Any more ideas to be included into this patch?

Leeteq’s picture

Version: » 4.7.x-1.x-dev

Hmmm. Could this be used to generate a list of only the terms in a vocabulary, not the nodes, but only the terms listed alphabetically - with links to their respective taxonomy page? (and indented to show the hierarchy of the terms, at least the first two levels).

If I am not mistaken, the views alternative is concerned with posts/content tagged with the terms, but often it is simply a list of the terms in a vocabulary that is needed. There are a lot of posts about this strangely missing feature in Drupal core.

PS. Please give me a hint of how if this is already possible with this module.

danielnolde’s picture

Hi DanielTheViking,

if i'm not mistaken, a taxonomy-driven listing of terms without nodes assigned to those terms is not possible with the views module in general, since the views-module is basically node-oriented and thus can only display lists based on node-table-selects.

cheers,

Daniel

merlinofchaos’s picture

Committed for version 1.1

merlinofchaos’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)