We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37042
    • 384 Posts
    I have a TV (Input Type:Date) called "meeting-date" which outputs dates in following date format:
    %H:%M, %A, %d %B %Y


    On the front end, this generally looks like
    17:00, Sunday, 31 March 2013

    I can pull that onto the Resource with the TV but how would I pull only partial elements onto other resources. IE On my homepage I am trying to pull in just the date (%d) and then the month (%B) of that particular TV.

    Can that be done?
      ...
      • 42046
      • 436 Posts
      You can use output modifiers to alter the display of a TV date: http://rtfm.modx.com/display/revolution20/Date+Formats

      How you pull them to another page depends upon your site setup to some degree.

      For example if you were pulling the details of a child page through getResources, your tpl chunk could contain:

      [[+tv.meeting-date:strtotime:date=`%d %B`]]


      ..... to pull the date and display it in the format you want. [ed. note: absent42 last edited this post 13 years, 5 months ago.]
        • 37042
        • 384 Posts
        Thanks Dan. Got it to work.
        In the end I didn't want to use getResources so I tried the fastField extra after getResourcesField wouldn't work.

        [[#307.tv.Meeting-Date:strtotime:date=`%d`]]
          ...