Maybe I’m wrong but looking at the db with phpmyadmin the createdon/publishedon/editedon date is in unix timestamp not in mysql timestamp, so the code in ditt.class.inc.php, calls the function strftime:
if (in_array("date",$this->fields["display"]["custom"])) {
$timestamp = ($resource[$dateSource] != "0") ? $resource[$dateSource] : $resource["createdon"];
$placeholders['date'] = strftime($dateFormat,$timestamp);
}
The TV i created has nothing to do with ditto since is created via modx, but still has the same value.
Anyway there is another problem with ditto. I tried to pass the &tpl variable in ditto call with the following:
[[ditto? &tpl=`my_news` &parents=`25`]]
I got the result
&tpl either does not contain any placeholders or is an invalid chunk name, code block, or filename. Please check it.
I have to say that i created the chunk with the code copied from ditto itself that is:
<div class="ditto_item" id="ditto_item_[[+id]]">
<h3 class="ditto_pageTitle"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h3>
<div class="ditto_documentInfo">by <strong>[[+author]]</strong> on [[+date]]</div>
<div class="ditto_introText">[[+introtext]]</div>
</div>
I hope someone will help me to find a solution or, alternatively, to suggest me another snippet or extra instead of ditto.
Thansk all