0

i would like to print the children of taxonomy term in its parent taxonomy page.

For example there is a news portal and under Sports taxonomy term page i would like to print the children of Sports term:

SPORTS

football #basketball #tennis ...

and then the latest nodes...

How can i achieve this?

1
  • Thanks for the replies but you are proposing to make a block in a different region of th page and print the child-terms using views. I would like to print the terms under h1.title of the page term and before the nodes.
    – isin
    Aug 28, 2014 at 9:40

3 Answers 3

1
  1. Create a view of taxonomy terms
  2. Create a block display for the view
  3. Add a contextual filter for vocabulary ID
  4. Make the block show up on all vocabulary pages in the block settings.
5
  • This is a good solution if you're OK with using a Block to display the children. Aug 28, 2014 at 14:03
  • Well yes it's not a good solution for someone who hates the Block module I suppose.
    – beth
    Aug 28, 2014 at 20:33
  • I love Blocks. They are very handy to drop into regions, and this works especially well with responsive themes. I've struggled with Panels playing nice with responsive themes, so I've been using blocks much more these days. Aug 29, 2014 at 14:24
  • I tried but i get server error 500 when i create such block. I keep searching for the error.
    – isin
    Sep 4, 2014 at 19:49
  • When exactly does the server error happen? What's in the Apache log?
    – beth
    Sep 4, 2014 at 20:59
0

It's really easy to achieve this using the Views module.

Just install the views module and add a new view page fetching the taxonomy terms. The procedure is pretty straightforward if you know how to use Views.

0

Use Panels for this, and the Views content panes sub module that comes with it. Download and enable the module (and the sub module) as usual, then...

  1. Create a view of taxonomy terms
  2. Add a contextual filter for a term id
  3. Go to admin/structure/panels
  4. Enable the Taxonomy term template
  5. Edit the Taxonomy term template
  6. Add a new variant
  7. Add the Taxonomy term view you created earlier to the content, and pass the current page's taxonomy term id context as an argument to the View
  8. Add the Taxonomy term Description content to the Panel
  9. Add the List of related items content to the Panel

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.