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

    I am trying to display a list of 5 of the latest pages in the News and Events category in a box on my homepage.

    I gather there are a few ways of doing this and just wondered what the best way to do it would be.

    Any help would be much appreciated smiley

    Cheers,

    Tom

    This question has been answered by multiple community members. See the first response.

    • discuss.answer
      • 36470
      • 12 Posts
      [[getResources? &parents=`35` &tpl=`YourTemplateChunk` &sortby=`publishedon` &sortdir=`ASC` &limit=`5`]]
      


      35 is the id of your News or Events container.
        • 43579
        • 2 Posts
        Thanks Svetoslav

        Sorry I'm completely new to this and probably asking really stupid questions sad

        Where you have the "&tpl"... I assume I just need to create a chunk that has the tags that I want to display.

        Is that all I need to do?

        Thanks,

        Tom [ed. note: tomsmith last edited this post 13 years, 3 months ago.]
        • discuss.answer
          • 27708 MODX Staff
          • 2,502 Posts
          Tom, yes. You can see all the instructions for getResources here: http://rtfm.modx.com/display/ADDON/getResources it's the Swiss Army knife of addons for fetching and displaying collections of Resources in Revolution.
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub