When using a copy of taxonomy/term/%-view for a special taxonomy (using tvi), then term description does not appear on top of term page.

Is there any solution for this problem?

Comments

derekwebb1’s picture

Assigned: Unassigned » derekwebb1

I will look into this... Thanks for the heads up.

derekwebb1’s picture

Ok I have a solution that is working but before I will release it, it needs to be checked by Adrian. Adrian is the resident Guru in module development on our team. I like to have all commitable changes get verified by him.

What I did was not tough though so I don't expect issues at all! Essentially what I did was add another theme function theme_tvi_term_description($term) that makes sure the term is an object and then returns this description. This description is then pre-pended to the view output. Easy... I was going to have it add this to the view header but that would not be quite so easy. Ha ha ha.

Like I said though I like to have Adrian verify before committing.

This should be released real soon.

Thank you for pointing that out. I almost never use the term descriptions however I can see how they would be useful.

Cheers, Derek

derekwebb1’s picture

See version 1.1. It should fix the issue. There is also a new theme function that you can play with to customize the rendering of term descriptions if you like.

Thanks DrupalFan2!

Cheers, Derek

derekwebb1’s picture

Status: Active » Fixed

Marking this issue as fixed. If the issue remains please open the issue back up.

Cheers, Derek

drupalfan2’s picture

Thank you very much!!!
Version 1.1 solved the problem.

I have never got such quick help.

derekwebb1’s picture

Glad we could help.

Thanks, Derek

Status: Fixed » Closed (fixed)

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

Sinan Erdem’s picture

Status: Closed (fixed) » Active

This commit is not good for me because I don't want the description to be printed. Before I was using TVI, I was emulating all term pages with a view and it wasnt displaying the description. Now the term pages have it... Is there a way to disable it without a CSS trick? (display:none)

derekwebb1’s picture

Good point. Currently no... Css is your ticket there. It is a good idea to include that in the future though. Thanks for the heads up. This should probably be in the next release.

Thanks Derek

rootwork’s picture

Title: Term description gets lost when using tvi » Disable display of term description when using TVI
Version: 6.x-1.0 » 6.x-1.1
Category: bug » feature

Any progress on this? I have the same situation as #8.

Hiding it via CSS is a workaround, and a pretty poor one from an SEO standpoint -- you don't want your (very search-valuable) taxonomy pages to be displaying duplicative information. Since search engines ignore stylesheets, that's exactly what they'll see.

I also strongly think that when it's turned on, it should be included in the view's header. Right now it's hanging out there outside of the view, which results in a bunch of needless extra theming to make it look like it's part of the view. Semantically it IS part of the view, and so really that's where it should live, not simply prepended to the view object.

I can help work on this, but wanted to see if anything had transpired in the meantime.

rootwork’s picture

OK, for the moment I'm overriding it through my theme's template.php (which means it won't be rendered at all and doesn't need to be hidden via CSS).

So until there's a module-based solution, here's how to override it:

/**
 * Implementation of theme_tvi_term_description().
 *
 * Overrides Taxonomy Views Integrator module's hard-coding of term description displays.
 */

function phptemplate_tvi_term_description($term) {
  if (is_object($term)) {
		// return '<div class="tvi-term-desc">' . $term->description . '</div>';
  }  
}

I'm simply commenting it out there, but you could remove the comment slashes and render it in some other way.

derekwebb1’s picture

Good stuff.

I don't know if I ought to add a checkbox setting (to display descriptions) or just let people rely on the ready-made theme override.

Cheers

derekwebb1’s picture

Status: Active » Closed (won't fix)

On thinking about it, I just don't know if I want to add a (dedicated) configuration page for TVI (it would be a whole page for a checkbox*). So far all configurations take place on the term or vocab edit form and I Really don't want ppl to have to tick a checkbox every time they want to hide the description.

But, if many people call out for this... then maybe...

Cheers, Derek

* Technically, I could have a high level of discrimination and have more than one checkbox on the page (one for each TVI enabled vocab and term)

jdln’s picture

How do I apply the code from #11? If I add it to my template.php I get a blank page when I refresh. If I remove the opening and closing php tags then their is no change.
Thanks

Ross-Hunter’s picture

I would love to be able to hide the description on a vocabulary by vocabulary basis.

Another (seemingly) simple solution would be to add the name of the taxonomy as one of the classes added to '.tvi-term-desc'

fadgadget’s picture

#11 worked fine for me. Thanks.

fadgadget’s picture

this isnt working for me anymore since the update of the module. Would this be correct? thanks.

doublejosh’s picture

Seems appropriate to have a checkbox within the taxonomy TVI field-set to hide the description. Might even be appropriate to have the title overridden by the view title as well.

Canadaka’s picture

Version: 6.x-1.1 » 7.x-1.0-alpha4

what is the status of this? The Drupal 7 alpha4 version doesn't seem to display the term body and there is no option.

duaelfr’s picture

Please open a new issue, this one is set as "won't fix" and now Terms are Entities, this can become a lot more complicated because of the additional fields