We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10313
    • 375 Posts
    Hello, im trying to use PHx for the first time. As i try it within Ditto, I’m posting in this forum.

    I’m using this chunk for displaying ditto items:
    <div class="valiste">
        <span class="datum">[+VAStart:date=`%d.%m.`+]</span> <a href="[~[+id+]~]"><h2>[+pagetitle+]</h2></a>
    </div><br/>
    


    Ditto is called by
    [!Ditto? &parents=18 &tpl=`VAListe` &sortBy=`VAStart` &sortDir=`ASC`!]


    I’m expecting an output like
    19.12. Name of the event


    But I get
    01.01. Name of the event

    I get [tt]01.01.[/tt] for any event that ist output. When I omit the PHx part in the chunk, the correct date and time is output.

    Any ideas what i’m doing wrong?

    Thanks
    Martin
      • 18397
      • 3,250 Posts
      What is the content of the TV without the PHx modifier? Also, you might want to set &dateSource to your TV and &dateFormat to %d.%m. then use [+date+] in your tpl.
        • 10313
        • 375 Posts
        Hi, thank you very much for these hints. I first tried to do it with [tt]&dateSource[/tt] and [tt]&dateFormat[/tt], resulting in the same output (01.01.). Then I looked at my date TV and found that it must be set to [tt]Unixtime[/tt]. Now it works very fine.

        Greetings
        Martin