Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jason Kunkle 13 posts 123 karma points
    Sep 08, 2023 @ 15:12
    Jason Kunkle
    0

    How to use query builder to just get content items that are the children of a parent content page?

    I have an Interior Page Document type and Interior Page Items Document Type. enter image description here

    I have the Interior Page Items set as the child of the Interior Page. enter image description here

    I greated two content pages using the Interior Page Document type that have multiple sub items using the Interior Page Items Document Type. enter image description here

    In my template how would I create a query using Query Builder that would only show the sub items attached to the page? In this case I only want the items below the Visit Oshkosh Public Museum page to show up on that page and the items below the Education page to show up on that page.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Sep 08, 2023 @ 15:59
    Huw Reddick
    100

    you don't need a query for that you can simply use

    var subPages = Model.Children;
    
  • Jason Kunkle 13 posts 123 karma points
    Sep 08, 2023 @ 16:05
    Jason Kunkle
    0

    That worked perfect! Thank you.

Please Sign in or register to post replies

Write your reply to:

Draft