its displaying 01 January 1970.
i dont no why?
that is the default php time stamp...are you sure that the pub_date is set? This is only set if you use the ’publishe on’ setting for the document in question. The +date+ placeholder in Ditto will reert to other time options if it finds one empty which may be why it seems to be working in the Ditto tpl.
If you want to simply use teh date when the document was published, then use [*publishedon*] rather than [*pub_date*].
-
☆ A M B ☆
- 24,524 Posts
Keep in mind that Ditto is running on the page it is called on; let’s say document 4 has your Ditto call. MODx will process [*...*] tags, which will get the variable for the current document, which is document 4.
Now, Ditto is processing documents, one at a time. Every time [*...*] gets processed, it’s still for the current document MODx is parsing, document 4. The correct tags for getting the variables for Ditto’s processing is [+...+]; Ditto will replace these tags with the value for each document it is processing.
So you have the MODx parser processing the current document to generate the web page, and it uses [*...*] for the values for that document. Ditto does its own processing of the pages you tell it to one at a time, using [+...+] placeholders for each one.
What about displaying the author’s name in the post?