We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18817 ☆ A M B ☆
    • 205 Posts
    I have a resource Knowledge Base that is a container for multiple Collections. Each Collection will act as a "category" for the Knowledge Base.

    Knowledge Base
    - Category One (collection w/ resources)
    - Category Two (collection w/ resources)
    - Category Three (collection w/ resources)

    What I've got so far:
    On the Knowledge Base resource is a Chunk w/ a pdoR call to show it's children (the categories). That Chunk has a few things + (here's the question / idea) another pdoR call to get the children of that category ....

    Since I'm trying to keep it as dynamic as possible, ie Client adds a new category (collection + resources), it will show up automagically on Knowledge Base + the category's articles, I'm trying to figure out if that's possible, and if so .. how do I set the parent to be that category?

    Knowledge Base has chunk Content Channel Feed. That chunk has the pdoResources call (working currently):

    <div class="container" id="question-grid">
        [[pdoResources?
            &parents=``
            &limit=`0`
            &depth=`0`
            &tpl=`tpl.ContentChannelCategory`
            &processTVs=`1`
            &tvPrefix=``
        ]]
    </div>


    tpl.ContentChannelCategory chunk has some markup + another pdoResource call (this is where I'm stuck, if possible):

    <div class="masonry-item channel">
        <h6><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h6>
        <img src="//placehold.it/333x162&text=image" alt="[[+pagetitle]]">
        
        [[pdoResources?
           &parents=`[[*id]]` <-- obviously not right, but would would be?
            &limit=`0`
            &depth=`0`
            &tpl=`tpl.ContentChannelArticles`
        ]]
    
        <hr>
    </div>


    tpl.ContentChannelArticles is the chunk that simply lists the articles in that category

    <div class="article">
        <p class="article-title">[[+pagetitle]]</p>
        <p class="article-blurb">[[+introtext]]<a href="[[~[[+id]]]]">Continue reading <i class="fa fa-angle-right"></i></a></p>
    </div>

    This question has been answered by mayhemchaos. See the first response.

      Sal Baldovinos
      SEO & DIGITAL MARKETING

      ARIEL DIGITAL | Maximize Your Potential
      www.arieldigitalmarketing.com
    • discuss.answer
      • 18817 ☆ A M B ☆
      • 205 Posts
      This ended up being much easier than anticipated....

      Just use [[+id]]

      <div class="masonry-item channel">
          <h6><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h6>
          <img src="//placehold.it/333x162&text=image" alt="[[+pagetitle]]">
           
          [[pdoResources?
             &parents=`[[+id]]` <-- this allowed me to pull in the collection's children
              &limit=`0`
              &depth=`0`
              &tpl=`tpl.ContentChannelArticles`
          ]]
       
          <hr>
      </div>
        Sal Baldovinos
        SEO & DIGITAL MARKETING

        ARIEL DIGITAL | Maximize Your Potential
        www.arieldigitalmarketing.com