0

I would like to display a list of link in a block that are related to the taxonomy term of my main article.

I read others subjects like article-view-with-links-to-other-articles

but it doesn't work for me. My URL is like that : example.com/product/[node:id] (Maybe it doesn't work because i don't have the term id in my url)

My article has a vocabulary call "tendance", this article is tag with the term, for instance "tendance one". I would like to have all the article tag with "tendance one"

I have this configuration:

  1. Contextual filter: Content nid
  2. WHEN THE FILTER VALUE IS NOT AVAILABLE : raw value from URL
  3. I add validation etc.
  4. And in More section, i click on exclude

So i had a list of all my article in my block thanks to the exclude but there are not related to the term "tendance one" of my main article.

I tried to add relationship :

  • Content: Taxonomy terms on node (and i select my vocabulary "tendance" and required relationship)
  • Taxonomy term: Content using tendance

And it doesn't work, i always have the same list of article linked to the good vacabulary but not to the good term.

Do i have to pass in my url the taxonomy term to make it work? Thanks,

1

i've just found the perfect solution for me.

I tried a lot of solution with some php code but without success.

The problem was : I had one view which display an article (with a taxonomy vocabulary) and i wanted to add a block with a list of link of another content type who are linked with the same taxonomy term.

URL: www.example/product/[nid]/[title]

Contextual filter

  1. Contextual filter: Content nid
  2. WHEN THE FILTER VALUE IS NOT AVAILABLE : raw value from URL (path -> 2 to retrieve the node id)

RELATIONSHIPS

  1. Content: Taxonomy terms on node (with Require this relationship)
  2. (term) Taxonomy term: Content with term (with Require this relationship) -> Relationship -> Taxonomy terms on node

And after you have to come back to the contextual filters:

  • And add a Relationship to Taxonomy term: Content with term

Now it works great, i have all my other content type with the same term of taxonomy linker to the term of the main article display by view on my page.

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.