We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23344
    • 31 Posts
    New to Modx (from the world of WordPress and Radiant CMS). Trying to get my head around this.

    Basically I need the whole post on the home page, then an archive child page, then post children of that. I think the archive thing is pretty well documented so I’ll stick with my home "Parent-of-all-parents" page issue.

    I need the most recent post, the whole post, through a chunk that displays title, author, pretty date, whole post, no comments.

    [!Ditto?  &tpl=`tplBlogHome` &orderBy=`createdon ASC` &display=`1` &dateFormat=`%e %B %Y`!]


    The above I’m sure is missing some things. But what?

    Also, is there a placeholder for the whole post? I can’t find one. I just see things like [+summary+].
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If your posts are sorted by createdon (create date) then you could use the &tplFirst parameter to specify a chunk tpl to use for the most recent post, and have it use [+content+] to get the whole thing. The fields for each document can all be accessed via placeholders; [+title+], [+longtitle+] etc. as well as Ditto - generated placeholders such as [+date+], [+url+] and [+author+].

      http://ditto.modxcms.com/files/snippet-ditto-php.html#tplFirst

      http://www.mediafire.com/?kqgxtxy4nyy
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org