How To Display subterms under parent Terms using views ?

  0 comments
Share

You can use Views to achieve the structure of sub-terms under parent Terms. Views are a User interface for sql searches so you are setting the definition for the query that will be made of the content database.

Steps to create sub-terms under parent Terms using views:--

  • Create a view to display a taxonomy term with a page with a path configured.
  • Add Taxonomy term: Term ID in CONTEXTUAL FILTERS.
  • Add Taxonomy term: Parent term in RELATIONSHIPS.
  • Add Taxonomy term: Parent term in Filter criteria section. select great than 0.
  • add Taxonomy term: Rendered Taxonomy term to your Fields, select relationship to parent and check the Exclude from display.
  • In setting, under FORMAT section. In grouping field 1, select (Parent) Taxonomy term: Rendered Taxonomy term.
  • Under Sort criteria, add Taxonomy term: Name, Sort ascending or descending and select parent under relationship.

    Term Parent Child Listing

Your view preview should look like

Preview On View Page Image

Now, Check your Page display will output as a tree

Term Parent Child On page

Style this page as your requirement.

Add new comment