I'm having some trouble trying to get a tax. term description to show in Views.
I have a page View with an exposed filter of taxonomy terms. The page layout is like this:
Page Header
---------------
Exposed taxonomy filter drop down | Select button
Tax term description box
--------------
Relevant node to tax selected
Relevant node to tax selected
Relevant node to tax selected
Relevant node to tax selected
Relevant node to tax selected
I have the header defined within the View itself as is the exposed filter, but the tax term description box is themed in template.php and the displayed nodes are also themed in template.php in a foreach loop.
I need the selected taxonomy term's description to show up in the description box. I have tried to use version 1 of the Taxonomy Context module, but that didn't seem to work.
Any insight in to this would be helpful - although a solution would be greatly appreciated (obviously).
Thanks
Comments
same problem
same problem:
taxonomy views with term destription in header? how? :}
same question for me.
same question for me.
This works
(at least with D6, have not tried with D5 or earlier)
-c
is there anyway to have this
is there anyway to have this show only on the first page of the list and not on the paginated pages
taxonomy_term_load in D7
FTR, chrisyates' code worked for me in a D7 Views header by simply substituting taxonomy_term_load for taxonomy_get_term
https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/funct...
This also works with php code
This also works with php code in header
------
GiorgosK
Web Development
Solution for D7
To get the taxonomy description in views in Drupal 7 you can follow this:
So above steps should get your taxonomy term description and image in the view.
- Mittal Patel
http://www.MittalPatel.co.in
http://www.TriCoreITSolutions.com
Great D7 solution Mittal,
Great D7 solution Mittal, thanks!
This worked in view displays, But how to get this into a views template file?
I have a working template file views-view-fields--event--panel-pane-1.tpl.php that's properly displaying the other fields, but not this one.
When I look at the theme info supplied in Views interface it says the id for this field is simply "description", but the following code is not printing the description
<?php print $fields["description"]->content; ?>Is my code wrong? Or does the template file need something else to get the relation info? Something else?
Thanks Mittal perfect. And to
Thanks Mittal perfect.
And to get it into the view header as requested earlier in this thread.
Set field to Exclude from display.
Configure Header: Global: Text area
Check the box "Use replacement tokens from the first row"
in header use [description]
Hal Eagar
Software Architect
hal.eagar@door3.com
Views - Taxonomy Terms and Node References and Address Field
Thanks for your tip.
I was able to expose the taxonomy but I want to specify specific fields from the taxonomy. My taxonomy is Locations and has Address Field fields associated with each terms, I'd like to expose only the "state" taxonomy field in my view.
My view is a EVA view involving Node References in an embedded table view.
How do I do that?