Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.6
Component:
taxonomy data
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2009 at 19:45 UTC
Updated:
23 Aug 2009 at 00:53 UTC
Jump to comment: Most recent file
Comments
Comment #1
liquidcms commentedyes, this would fix my problem:
i am trying to create a view that has title's that link to another view with an argument.
view1 - stuff categories, with list of "stuff taxonomy nodes" (using nat)
- this view has each node with a title that should link to
view2 - list of stuff nodes that are tagged with a "stuff tax term"
ideally title links in view1 would have urls that were SEO happy and use term name rather than id, but example terms is "know & grow" and even though this works in the views preview, i can't get it to work for real in the url.
so fall back is to use term id - BUT.. i can't get that as a field (issue posted here) so i can't use it as a token to re-wrtie my title urls.
i am think above was pretty confusing.. lol...
view1 = stuff_cats
- teaser list with each title having url like /stuff/1 (but can't get term id to make this url) or stuff/know-&-grow (which doesn't work since i can't get & to pass through)
but, view2, which is at /stuff/%1 does work in preview when i enter "know & grow" as argument.
Comment #2
liquidcms commentedand yup, commenting out the line you pointed out above gives me back Term ID as a field and now i can make this work (albeit in the less seo happy form)
thanks.
Comment #3
mlncn commentedCommenting out that line solves the issue with no ill effects? At the design camp session on views 2 theming a workaround for this is being presented.
If this is a solid fix we should submit a patch.
Comment #4
ayalon commentedI had to comment out this line too, because we really need the Term ID as a token to rewrite URLs!
Please remove this line in views.taxonomy.inc
I made a patch for the latest dev version 2.x
Comment #5
attiks commentedIt wasn't working for me probably because i was filtering on 1 vocabulary and needed the tid of another one, so I used 'Taxonomy: All terms' field limited to the vocabulary i needed and in my tpl.php is used this to extract the tid
Comment #6
sammys commentedThe patch in #4 works as described. Using 2.6 there is no Taxonomy: Term ID field available. Before patching there is no way to get the numeric ID from the view. This is especially important when using global text fields or rewriting the output of other fields with the term ID.
The patch doesn't show a field setting to specify the vocabulary for the field. Marking the issue as needs work as it does IMHO. Maintainers?
Comment #7
merlinofchaos commentedThere shouldn't be. That's only in use for 'all terms' which will load every term. If you need a tid from a specific vocabulary you have the same issues as you'll have with the Taxonomy: Term field.
Comment #8
attiks commentedMerlin,
Can you give me feedback on the solution in #5, are there better ways the achieve this? It would be easy to just select a Taxonomy Term field and limit it to one particulary vocabulary, and maybe add 2 display options: TermId or Term
Comment #9
merlinofchaos commentedall terms is going to need a more complicated rewrite methodology. I have something in mind, but it's fairly separate from this.
Comment #10
merlinofchaos commentedApplied to 2.x and 3.x branches.
Comment #12
mlncn commentedSee http://drupal.org/node/443186 for a patch that addresses the problem of displaying the term ID.
ben, agaric