it should work as long as the date TV is not formatted with a Date Formatter widget...
Alternate method to format date if you use the
PHx plugin is use
PHX date modifier :
[tt][*item-date:date=`%d.%m.%Y`*][/tt]
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
I simply cannot get this to work. It displays nothing. I have put the code into the template and it just displays:
By on .
On the places where the date and author should be, there is only empty space. Anyone knows why?
Is the document created using newspublisher or other front end document manager?
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
If the document would have been created with newspublisher snippet, it would have explained why the AuthorTimestamp was not working.. But don’t know why it’s not working for you then.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
There big problem is that there is am extra /* in the top comments that are breaking the snippet entirely by making it all a comment. Remove one of the /* from the first line. Then there is no closing ?> at the end of the document, snippets need opening and closing php tags.
That should do it. There is some old API calls but they seem to still work. For example it says $modx->dbQuery($query); but shouldn’t it be $modx->db->query($query);? I tested and both work so it may not make a difference.
Another "Is There Any Way..." question...
I want to show the date that the website was updated, no matter which page. I’ve got "Last Updated: (date)" working fine for each single page, but is there some way that GetTime can show a site-wide update date (tied to any page on the site, not tied to specific pages)?
(I’ve tried LastUpdate, and can’t get it to present the correct date).
Thanks for any help with this.
-
☆ A M B ☆
- 24,524 Posts
I think you’d need a custom snippet for that; it would need to query the site_content table, order by the editedon field, and grab the latest date to display.
return date('j F Y', $modx->db->getValue($modx->db->select('editedon', $modx->getFullTableName('site_content'), 'published=1', 'editedon DESC', 1)));