Hi Wim

Going back to content taxnomy field, I want to display it with hierarchy in fieldgroups without hard coded it to tpl file. What I need to do on content taxonomy field to achieve these? Right now it's breaking it on coeach child. Basically i would like to have Hiearchly level, list level etc on each content taxonomy field.

Thank you

Comments

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)

You want to display it in a manner like "term 1 > term 2 > term 3"? If not, please clarify.

autonetex’s picture

Yes, like that. Some kind of control on the field (content field) level, rather than hacking it. Also list style like "term1, term2, term3" as second choice/option will be nice.

wim leers’s picture

Title: Displaying Contnent Taxonomy field in Panel's Content Fieldgroup » Hierarchical formatter for Content Taxonomy fields
Assigned: Unassigned » wim leers
Priority: Normal » Minor
Status: Postponed (maintainer needs more info) » Active

I will look into this.

autonetex’s picture

Thank you, we can to as paid service.

wim leers’s picture

Title: Hierarchical formatter for Content Taxonomy fields » Hierarchical formatters for Content Taxonomy fields
Status: Active » Fixed
StatusFileSize
new3.91 KB
new3.89 KB

Implemented!

You could still show your appreciation by donating some money ;) :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

BenK’s picture

Version: 5.x-3.x-dev » 6.x-3.x-dev
Priority: Minor » Normal
Status: Closed (fixed) » Active

Hi everyone,

I'd like to suggest a new type of hierarchical formatter for content taxonomy fields. Basically, I'd like only the last term in the hierarchy to be a link, but the parents terms in the hierarchy to be displayed as text.

Here's why: In out use case, we aren't saving the entire lineage (we've selected the default "save only the deepest term option"). As a result when you follow the link to a parent term, there are no nodes displayed on the parent term page. So we'd like to be able to link users to the deepest term page, but just show the parent links as non-linked text.

How difficult would it be to create this as a new formatter for use on the CCK "display fields" page?

Thanks,
Ben

wim leers’s picture

That'd be very easy.

I'll definitely accept a patch that implements this.

You'll want to edit modules/hs_content_taxonomy.module. Start by looking at the hs_content_taxonomy_field_formatter_info() function and you'll find the other relevant portions of code easily :)

Bilmar’s picture

subscribing

wim leers’s picture

Status: Active » Closed (fixed)

Closing due to lack of response.

Hardrocker’s picture

Hi there I am creating a business directory website and am having some problems with the taxonomy levels. What I am trying to do is this. I have the vocabulary with predefined terms as shown here http://pastebin.com/8CtbZKNm These terms are a multiple select list via check box since one business can fall into different categories. However what I want is to also have users after selecting a category or categories for their business they must also specify a more specific business nature/type. This business nature/type I am hoping to use cck content taxonomy with autofreetagging based on the user's inputs. My question is how can I have the autofreetagging values added under the terms (categories) as a sub-term? Example is Consutants and Contractors =-> Civil Engineer Consultants, Electrical Contractors etc

diego.mazzaro’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Assigned: wim leers » Unassigned
Status: Closed (fixed) » Needs review
StatusFileSize
new4.1 KB

I'm here submitting a patch to add new formatters.
These two are already available:

  • Hierarchical links
  • Hierarchical text

These are what I am providing:

  1. Hierarchical text last link
    • The one originally asked by BenK
    • Multi-value example: Root1 > Branch2 > leaf2, Root1 > Branch3 > leaf3, Root2
  2. Hierarchical links last text
    • Reverse case: similar to a navigation bar with links only to parent items
    • Multi-value example: Root1 > Branch2 > leaf2, Root1 > Branch3 > leaf3, Root2
  3. Last link only
    • Only last item of each lineage showed as link. Useful in compact views like tables to have only selected items (last of lineages) if save lineage is being used.
    • This is actually the formatter I need. This way I can use save lineages to work easier while searching and filtering and at the same time have a compact display.
    • Multi-value example: leaf2, leaf3, Root2
  4. Last text only
    • Only last item of each lineage showed as link.
    • Same as previous but as text.
    • Multi-value example: leaf2, leaf3, Root2

I did some tests but obviously a community review has to be carried out.
Hope this can be useful.

PS: I changed the version of this topic to 7.x-3.x-dev since it has been in this version that I've implemented the patch

wim leers’s picture

You very clearly explained what you added. Before I can properly review this patch, you will have to reroll it to fix formatting issues: you've used tabs in some places. Drupal uses 2 spaces per indentation level instead of tabs.

Please see http://drupal.org/coding-standards :) Furthermore, I'm honored that Hierarchical Select is the first module you're contributing to! Thank you very much! :)

diego.mazzaro’s picture

StatusFileSize
new4.7 KB

Gulp... ...coding-standards...
you're rigth! ..thanks for your polite advice.
I did the homeworks ;-) and here is back my patch! ...fixed in tabs and also other few spaces that were missing.

wim leers’s picture

Title: Hierarchical formatters for Content Taxonomy fields » More hierarchical formatters for Taxonomy fields
Component: Code - Content Taxonomy » Code - Taxonomy
Status: Needs review » Fixed

Almost perfect: code works perfectly, only minor formatting issues remained, which I fixed for you. Thank you very much — very nice addition! :)

I'm looking forward to more of your high-quality patches ;) :)

Commit: http://drupalcode.org/project/hierarchical_select.git/commit/ca7787e.

wim leers’s picture

Status: Fixed » Closed (fixed)

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