We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33688
    • 54 Posts
    Hey,

    This is no big deal... but how come I get two different outputs from an identical NewsListing call? In both cases the simple call looks like this:

    [[NewsListing? &tpl=`NewsListingTemplate`&startID=`6` &summarize=`3`]]

    ...referring to this simple template:
    <div>
    <h3><a href="[~[+id+]~]">[+longtitle+]</a></h3>
    <div>[+introtext+]</div>
    <p>[+link+]</p>
    </div>

    Only difference is that one is called from the Document content and the other from inside a Template Variable. Still, the latter mysteriously adds this code:

    <h3>Older Items</h3><div id="nl_archivelist"><ul><li><span class="nl_month">March 2006</span><ul><li class="nl_archpost"><a href="index.php?id=13">Article two</a> (<span class="nl_date">29-Mar-06 11:15</span>)</li><li class="nl_archpost"><a href="index.php?id=12">Article one</a> (<span class="nl_date">28-Mar-06 08:57</span>)</li></ul></li></ul></div>

    ...producing this output:

    Older Items
    - March 2006
    - Article two (29-Mar-06 11:15)
    - Article one (28-Mar-06 08:57)


    Why? And what’s the parameter to turn this off?

    Thanks in advance,

    Mats W.
      • 33337
      • 3,975 Posts
      Zaigham (aka zi) Reply #2, 18 years ago
      NewsListing automatically shifts older posts/documents into "Older Items" e.g. previous month posts, to stop displaying it, add &paginate=`1` in your snippet call, and use Page# place holders. Also increase &summarize to 10, so 10 articles will be displayed on each page.

      Hope it helps

      regards,

      zi
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 33688
        • 54 Posts
        Yes indeed, it helped. Great, thanks! smiley

        Mats
          • 18397
          • 3,250 Posts
          MARKSVIRTUALDESK Reply #4, 18 years ago
          You can also either use &showarch=0 to hide the archives if you don’t want pagination. Additionally you can set total to 3 to only retrieve 3 items instead of the default [all]
            • 33688
            • 54 Posts
            Yepp, that solved it as well. Great many thanks! smiley

            Mats W.