By traceelements on
I was wondering if anyone could help me to find/write the php code to call the description for a taxonomy term on it's page? I have built a custom page using views to display the term, and would like to put php code into the header to display the term description, but my skills in coding are lacking. Please help!
Comments
There's a solution posted
There's a solution posted here that should work: http://drupal.org/node/276341.
Thank you so much!
Pixelite, that worked! I changed part of the code (taxonomy_get_term replaced with taxonomy_term_load) to work for Drupal 7. Here's what I used in case anyone else has this issue:
Does anyone know how to apply
Does anyone know how to apply this to the taxonomy/term/all page (for Drupal 7)? I'd like to accomplish output like this:
Taxonomy Term Title
Taxonomy Term Description (this is the kicker... how can I output the Description associated with the term, and repeat for each term on the SAME page... urgggg)
Node teasers related to the term
Taxonomy Term Title
Taxonomy Term Description
Node teasers related to the term
Taxonomy Term Title
Taxonomy Term Description
Node teasers related to the term
etc
Urgg this is so frusting to figure out, yet is should be a simple setting.
Thanks for anyone's help.
Thanks.
One has to add this code in the page.tpl.php template file, just above the line,
print render($page['content']);. It works like magic.This gives me an empty ...
The code above gives me an empty result (I'm running Drupal 7). I placed
this into page--front.tpl.php ...
... and I changed the 2 to various numbers, and every time it just comes up empty. On a related note, is it true that I can see the term-id by studying the URL when I edit the term?
Please advise.
On a related note, is it true
Yes, it will appear something like: yoursite/taxonomy/term/7/edit/destination/admin/structure/taxonomy/vocabularyname . The term-id is the number 7 after taxonomy/term
( dont want to be rude, but you could have tried it urself instead of asking )
For the rest of ur answer, if u are trying to read all the terms and create a div for each one, you could do something like this:
Note that this will print all the terms available in the vocabulary that u inserted in the variable $vid. So if u have 8terms, it will print 8 divs - each one with their respective term's description.
Hope that this is what u want :)
Dear rsrocha, can you advise
Dear rsrocha, can you advise how I can use your block code to display only the description of the term selected in a node creation form page?