We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17523
    • 3 Posts
    I am sure this is a pretty basic question, but still I am stuck at the moment smiley

    I have a List of Events on a Page in MODX Revolution 2.1.1 . For the Date of the events i defined a TV with the type "date" . Now the problem I have is that some events have a date and a time (e.g. 23.06.2011 18:00) others however only have a date (23.6.2011).

    in my output chunk i want to display the time (18:00) only if applicable. But so far I don’t know how to output modify the TV.

    [[+tv.showdate:ifnotempty=`[[+tv.showdate:strtotime:date=`%H:%M`]]`]]


    does not work, since the tv.showdate is never empty.

    Then I thought about only displaying the time if it is not the default value (1:00 am) but
    :isequalto=``
    will also not work, since the date string is always different.

    Of course I can have a workaround by having another TV with input type "text" and just write in 18:00 , but this is not so satisfying grin

    Any suggestions?
    Thanks in advance