We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6561
    • 139 Posts
    Is it possible to add a "Page last modified on..." on every page, that changes when the page is modified(saved)?
      • 26016
      • 561 Posts
      Yes, one way to do it is to install the PHx snippet (for date formatting), and then put this in your template, presumably near content. Adjust date format to taste (you may need to look up Unix date formats).

      [*editedon:date=`%d/%m/%Y`*]
      
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 16895
        • 87 Posts
        You should be able to change the bit inside backticks (``) to any combination of the characters listed at http://php.net/manual/en/function.strftime.php
          • 6561
          • 139 Posts
          I found a snippet that does what I want: SiteLastUpdated

          Did not find it at first since I was searching for ’page last edited’, ’last edited’, ...
            • 1892
            • 82 Posts
            Quote from: Darkelve at Mar 19, 2010, 05:06 AM

            I found a snippet that does what I want: SiteLastUpdated

            Did not find it at first since I was searching for ’page last edited’, ’last edited’, ...
            Won’t this just list when your site was last updated - not when a specific page was modified? Which do you want?

            I wanted to define when a page was modified so taken from
            http://mindspill.net/computing/cross-platform-notes/modx/modx-customisations.html
            I created a snippet called dateEdit with the following code.
            <?php
            // Output formatted page edited date.
            echo strftime("%A %d %B, %Y", $modx->documentObject['editedon']);
            ?>
            

            Then at the bottom of my template under the content block I have
            <h6>Last edit [[dateEdit]]</h6>
            


            The results can be seen on my recently launched website www.cherryclan.com , each page showing when it was edited.
              • 6561
              • 139 Posts
              Hmm, I think you are right.

              project was blown off, but it’ll be useful in the future. Thanks!
                • 44991
                • 13 Posts
                Is it possible to show time and date of a particular page/document?
                  • 42046
                  • 436 Posts
                  Quote from: hbdezine at Sep 10, 2013, 11:43 AM
                  Is it possible to show time and date of a particular page/document?

                  You should just be able to use for last edited on:
                  [[*editedon:strtotime:date=`%a %b %e, %Y`]]


                  For published on:
                  [[*publishedon:strtotime:date=`%a %b %e, %Y`]


                  For created on:
                  [[*createdon:strtotime:date=`%a %b %e, %Y`]]
                    • 44991
                    • 13 Posts
                    Hey Dan ..Thanks for the reply.

                    I have found something new for this. actually. That is exactly what I want. I just want to say Thanks to "sottwell"

                    Please check this if someone is trying to make similar :

                    https://forums.modx.com/thread/86596/show-last-update-time-date-of-a-particular-document-on-home-page#dis-post-477322