We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11975
    • 2,542 Posts
    Hi everybody,


    I’ll try to explain as best as I can the purpose of this post.

    I’m working on a project which tree repositery looks like that:

    /root
    --/Products (folder)
    ----/Fruits (folder)
    -------/Cherry (folder)
    -------->doc1
    -------->docN
    -------/Pear (folder)
    -------->doc1
    -------->docN
    ----/Vegetables
    ------/asparagus (folder)
    -------->doc1
    -------->docN
    ------/cucumbers (folder)
    ------/....

    For Products Page, I needed to list all categories by range of products(Fruits/Vegetables) as following


    Fruits>
    [*summary*]
    <!-- Start list fruits categories-->
    -------/Cherry
    /[*summary*]
    ....
    -------/Fruits category N

    Vegetables>
    [*summary*]
    <!-- Start list Vegetables categories-->
    -------/Cucumber
    /[*summary*]
    ....
    -------/Vegetables category N

    I was unable to achieve this using NewsListing and I didn’t find how to obtain this result
    (if anybody knows please share)

    But I’ve found a work around smiley

    I’ve created a TV: listModel (dropDown list) with tpl values(defaut|list|fiche) to set tpl parameter for newslisting snippet

    >> defaut chunk content:

    <div class="nl_summaryPost">
    <h3><a href="[~[+id+]~]">[+title+]</a></h3>
    [[NewsListing?startID=[+id+] &trunc=0 &summarize=3 &multilevel=1 &levelLimit=3 &showarch=0 &tpl=`ficheProduit` ]]
    </div>
    



    in The template I’ve inserted this call

    [!NewsListing?startID=[*id*] 
    &trunc=0 
    &summarize=10 
    &multilevel=0 
    &showarch=0 
    &tpl=`[*listModel*]` !] //tv for List Model
    



    Wouldn’t there be another way to get the same listing by calling newslisting snippet differently in the template.

    Thx

    P.S : hope that makes sense, thx for reading to the end smiley
      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l