I have my vocab index page showing a threaded list. However, if there is a description for a term, the entire description gets formed into the term link. So instead of having a nice, neat, term-based list, I instead have some list items which include that terms' entire description.

Any help as to how I can not display the descriptions in my list would be appreciated.

I am using Taxonomy Context as well.

Comments

Rob T’s picture

To solve this for my particular needs, I commented out the description call in the second-to-last line, line 452.

return '<li class="'.$zebra.($children?' parent':NULL).'"><a href="'.$url.'">'.$name.$description.'</a>'.$children."</li>\n";

to

return '<li class="'.$zebra.($children?' parent':NULL).'"><a href="'.$url.'">'.$name/*.$description*/.'</a>'.$children."</li>\n";

Are there any unintended issues that I may run into as a result of this modification?

xano’s picture

Assigned: Unassigned » xano
Category: feature » support
Priority: Normal » Minor
Status: Active » Closed (works as designed)

Changing the module's code yourself is not recommended. Using theme override functions is a better solution. Overriding the theme function does not have any effect on how the module works, so removing the description will not cause any problems.

Good luck!

amnion’s picture

I am new to Drupal, but would also like to have that function. I'm not exactly sure how to go about implementing the change using the theme override functions, because I have limited php knowledge.
Another thing I would like to see with this module is the number of nodes attributed to each item in the list. Other than that, excellent work!

xano’s picture

Hmm, I could build-in an option to disable term descriptions for the 2.0 version of the module. This version won't be released anytime soon, but you could check the 6.x-2.x-dev version from time to time, although it may contain some bugs (that's why it's a development version).

For understanding the theme override functions, please read the handbook pages about them thoroughly and read some tutorials about basic PHP as well. I think that should do the trick. If you still aren't able to get the overrides working when you've done that, please search the forums for solutions or create a new topic yourself when you cannot find any older topics.

Regarding your node count feature request: feel free to create a new issue about this feature.

xano’s picture

I have created an issue regarding the request for node counts.

summit’s picture

Subscribing, greetings, Martijn

xano’s picture

Assigned: xano » Unassigned