All MODX *publishedon dates showing same date despite different inputs

361 Views Asked by At

I am using:

[[*publishedon:strtotime:date=`%e %B %Y`]]

This shows a date (18 August 2015 for some reason) but it won't change. No matter what date I put into the Published On field this will not change.

I have tried reinstalling MODX to no affect.

Would anyone know how to fix this?

3

There are 3 best solutions below

0
On

It should work that way, if you want to access the publishedon field of the current resource.

If you want to access the publishedon field of resources listed with a getResources template chunk, you have to use

[[+publishedon:strtotime:date=`%e %B %Y`]]

0
On

I could be wrong, but have always thought that you can't enter a date into the Published On field; it takes its value from the Publish checkbox. Have you looked at the database to see what date is actually stored for that resource? And if the value stored in the db does in fact change when you enter a new date in the field...?

0
On

Ya, you are right: publishedOn is just the date when the resource was published or published again. Use a dateTV for something else instead, or better, use publishedOn as a fall back when the dateTV is not set.