3

In my panel in "Taxonomy Term Template" I have shown the children terms in the current parent term page. Now I need to attach/associate an image to each term to make it look nice. I do see the option of selecting the term image field in the panel settings but that field shows the current parent term's image not of the children.

I have already added images for each term in my vocabulary.

I'm on Drupal 7.

Here is the screenshot to elaborate the scene.

enter image description here

2 Answers 2

1

You should make a view that lists the terms in your node (use contextual filters) and add the image fields you added to that term.

  1. Create a node view that lists the node type that the categorized nodes come from.
  2. Add the fields used to categorize the nodes.
  3. Remove any other fields.
  4. Add a contextual filter for the node id (Content:Nid).
  5. Configure the contextual filter to have a default value and choose the 'id from url' option.
  6. If you add that block to a region, it should show a list of terms associated with a node.
  7. Now add the image field from the term, if you don't see that field you might need to add a relationship to that term field.
5
  • I have already tried doing it in views and it seems it has this weird grudge against showing/listing children terms in it. That's what made me use panels instead of it. Can you please (if it's even possible) tell me step by step how to show the children terms in views? Then maybe I can make a content pane and put it my panel. That certainly would solve the problem.. May 24, 2012 at 10:45
  • See updated answer.
    – ipwa
    May 24, 2012 at 11:35
  • 1
    ipwa from what I can see, Ali wants to list all child terms of a particular term, but your answer describes listing terms on a particular node. May 24, 2012 at 11:48
  • @ChrisCohen Exactly. But that's my secondary concern. The primary one is that since I've used panels to do this already, I need to show the children terms' images with them. It has to be possible in some way.. May 24, 2012 at 12:13
  • @ipwa Your solution really does what Chris is saying. May 24, 2012 at 12:15
0

Maybe this helps: https://drupal.org/node/1224916. I'm going to test it myself right now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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