We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1175
    • 3 Posts
    Hello to the MODx Community,

    Im a new user to MODx and loving its simplicity for template designs but I Seem to be stuck on find the tag to do the following.

    I’ve attached a picture of what I’m trying to work with to hopefully help you understand my goal.

    What is the template tag to call the date the article was posted?

    What is the template tag to call the number of comments the article has posted to it?

    What is the template tag to call the category the article is posted in?

    Thank you for all your help with this.
      • 7231
      • 4,205 Posts
      What is the template tag to call the date the article was posted?
      This would be pub_date, but it returns a timestamp so you would need to use a snippet to format it (or use some built in date formating available in snippets like Ditto if you are using this to display the articles.

      Here is a list of all the available document variables:
      http://www.modxcms.com/document-tvs.html

      The other questions are less straight forward. For the categories question this could be done either with "tags" or by physically putting the documents in a container (modx folders) and then getting the folder name with a snippet like GetField.

      For comments MODx depends on the Jot snippet, I think that it has built in comment counter features.

      One thing that you will see when using MODx is that there is rarely only one way of doing things. That is the beauty of MODx, no strict rules.

      I recommend that all new comers install a local version of MODx on their PC and study the sample content which includes a full featured blog.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]