1

I want to show a views-block on a taxonomy page.

There are two taxonomy vocabularies.

Collections: bronze, silver, gold & Sizes: small, medium, large

So I have url's like this: collections/bronze/small

So what I want to do: show articles that have a taxonomy term "collection" set to "bronze" and size set to "small".

I found similar problems, but I can't get it to work :(

Same issue, but didn't work out for me:

Edit: Hmm, it works when I enter "bronze" into "Preview with contextual filters:", but when I try it on the taxonomy page nothing is shown. My path looks like this: http://localhost/drupalwebsite/?q=collections/bronze

Overview of my view settings:

Fields: Title CK field: Image

Contextual filter: Collections taxonomy term

When value NOT available: Provide default value -> Raw value from URL -> 2th component.

When value IS available: Specify validation criteria -> Validator: Taxonomy -> Type: Term name conv. to ID -> Transform dashes to spaces

The taxonomy "sizes" isn't included yet in my view!

6
  • Enable the "taxonomy term" view, it's disabled by default. Then configure the 2 contextual filters.
    – uwe
    Jan 26, 2012 at 16:22
  • Please tell us what filters, fields and context filters (and settings) you have.
    – Ashlar
    Jan 26, 2012 at 16:25
  • Edited my previous post, there's an overview of my view now. Thanks in advance! Jan 27, 2012 at 11:24
  • Enabling the "taxonomy term" view is not such a bad idea... Is there an easy way to show the taxonomy terms: "sizes" if I go to the "collection" taxonomy page? Because they are divided in 3 sizes... Maybe I can make children in the "collection" taxonomy... Gold, with children Small, Medium and Large... Instead of using two taxonomy vocabularies. So I want to show the children of the taxonomy term if there are children. Otherwise I want to show the products. Jan 27, 2012 at 13:33
  • Hmm, the "taxonomy term" view doesn't show the "body / description (I use a dutch version so I don't know how it is called in english)" of the term on the page like the regular taxonomy pages does... THIS CAN BE EASILY SOLVED: pridedesign.ie/content/drupal-taxonomy-description-view Jan 27, 2012 at 13:49

1 Answer 1

0

Enabling the "taxonomy term" view and changing the settings is a way to solve this problem.

If you want to show the "taxonomy description" on your view you can use this method: http://www.pridedesign.ie/content/drupal-taxonomy-description-view

In Drupal 7 use the taxonomy_term_load() function instead of the taxonomy_get_term() function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.