We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4429
    • 429 Posts
    How do I show the current month on a page in modx.

    For example, if had had a page called News - January, how would i have modx always update the month?

    I have tried [+pagetitle+] - [+month+] but that doesn’t work.

    Also while we’re at it. What is the filter i need for ditto only to show news stories from the current month?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Make a snippet, name it "ThisMonth". Here is the code
      return date(F);

      Then use the uncached snippet tags:
      [*pagetitle*] - [!ThisMonth!]
        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