Can anyone please suggest, how to display hierarchical data using PageList?

The Category items stored at: /sitecore/system/Settings/Feature/MySite/Article Category: enter image description here

My articles stored at: /sitecore/content/MyTenantFolder/Sites/MySite/Home/MySite/Articles enter image description here

The Category items used as a Treelist field type in Article data template: enter image description here

And I wanted to display data like:

enter image description here

  • Can you add some screenshots how the structure of your data looks like? It's hard to imagine how your data looks like reading just your description. Page List is using Rendering Variants so I'm pretty sure that you will be able to display what you want (e.g. using Variant Query item) Jan 3 '18 at 10:30
  • The Category items stored at: /sitecore/system/Settings/Feature/ MySite/Article Category. My articles stored at: /sitecore/content/MyTenantFolder/Sites/MySite/Home/MySite/Articles. I tried pagelist with Redering Variants (Variant query) but it's only showing Categories not Articles inside that.
    – Amit Kumar
    Jan 3 '18 at 14:43
  • I am not able to attach the screen shot. For me it's just showing plain text not rich text box.Is there any way to attach the screen shots?
    – Amit Kumar
    Jan 3 '18 at 14:55
  • @AmitKumar you have to edit your original question. You can't do that in the comments section.
    – Richard Seal
    Jan 3 '18 at 14:57
  • @RichardSeal: Thanks for the information.
    – Amit Kumar
    Jan 3 '18 at 15:04

It is impossible to achieve that with out-of-the-box renderings.

The only one rendering that builds a hierarchical structure based on some field value is Archive rendering (typical archive functionality used on blogs).

enter image description here

You could potentially use Tag Cloud rendering, but it will not cover all your requirements (you can use data attributes which contains number of items with a given tag to display numbers but you will not see a list of all items which belong to this tag/category)

enter image description here

If I were you I would decompile Archive rendering and try to create a structure based on other fields. Right now it accepts only Date fields.

or Tag Cloud, you can change the facet for it (default is SxaTags field) right now, the only thing you have to do additionally is to render it differently (with list of items under each category)


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.