LastPublished Stack

LastPublished Stack

display the last published date in any format or language

As long as I remember, you can insert the date the page was last published with RapidWeaver’s %last_published% snippet. Although back in 2011 RealMac announced it was no longer supported, it still works. The date shown by this snippet will be localised, based on your system preferences for dates (mm/dd/yy or dd/mm/yy). Here’s an example of the output:

27/05/2018

That's it. But what if you prefer something like December 21, 2018 at 13:34?

Here’s where the LastPublished Stack comes in. This simple to use stack will display the last published date, but the many options of the stack make it possible to display the date in any format (7/6/2017, 17‑06‑07, 7 juni 2017, Sunday, June 6, 2017 etc.). You can even add the time and some text before and after the date to make full sentences.

The date can be fully localised and styled using the options of the stack. A time (in the formats hh:mm or hh:mm:ss) can be added after the date as well.

Demos
Here’s an example of the LastPublished Stack with its default settings:

Last published:

Below is another example, using just the month, the day of the month (with leading zero) and the last two digits of the year:
Names of the month are replaced with numbers (01…12) to show the month as digits.


Below is another example, using just the day of the week and some text before and after the date:

This page was last published on a rainy

Another example, localised (Dutch), with time and fully styled (see also fig. 1):

Deze pagina is voor het laatst gepubliceerd op

NB
The stack will use the date and time as set by the server the page resides on.
By default, the date text will inherit the styling of the area it is displayed in as defined by the theme. Use the option of this stack to overrule this styling.
For a date with digits only (like 03/04/17), replace the names of the months with 1-12 or 01-12.
In Edit mode, this stack cannot show the actual date, but at least tries its best to show the format and styling.

Background

I recently wanted to show the last published date on some pages of a site I was working on and I was not satisfied with the format of the %last_published% snippet. I reused a script I found here for that. It worked really well, so I decided to turn it into a stack.

Limitations
When the visitor has JavaScript disabled in his browser, the date will not show.

Support
Please use this form to report all issues, questions and comments.

This stack requires the Stacks plugin by YourHead (version 3).
LastPublished HUD
fig. 1
© 2012-2018 Marathia Web Design | Contact