Hi,
I’m using ModX 1.0.2 and Ditto 2.1.0.
I have a series of subpages which belong to a parent representing a month of the year e.g
- February 2010
-- page 1
-- page 2
-- page 3
- March 2010
-- page 1
-- page 2
and so on.
I’m trying to create a page which lists all the subpages when the parent page is visited using Ditto.
For each of the subpages there’s a template variable of type ’date’ with ’widget’ as UNIXTIME, called ’eventdate’.
My ditto code is:
[!Ditto? &dateSource=`eventdate` &display=`all` &tpl=`eventitemnew`&dateFormat=`%A %e %B %Y %l:%M%P` &sortDir=`ASC`!]
And the template content is:
<div class="item">
<h4><a href="[~[+id+]~]">[+longtitle+]</a> - [+date+] [+itemcategory1+]</h4>
<p>[+introtext+]</p>
<p></p>
<p><a href="[~[+id+]~]">Click here for more info...</a></p>
</div>
All the variables are being displayed fine on the page, and only the correct subpages are being displayed.
The problem is that the date isn’t being displayed at all no matter what I try.
The result at the moment is all dates are shown as:
Thursday 1 January 1970 12:00am
If I remove the dateSource parameter, and try to show the TV directly using [+eventdate+] (similar to [+itemcategory1+], which does work) then there’s no output.
Can anyone advise as to what’s going wrong, and if you need any additional info. I’ve spent the last 5 hours trying to figure this out.
Thanks in advance for all the help.
EDIT: I guess it’s useful to add, the same thing was working fine on ModX 0.9.6.3 and the problem started after the upgrade - no other changes were made. Also, I’ve tried disabling/enabling phx but it makes no difference.