Forum
Uploaded File datetime for output=""?
I've looked here:
https://docs.grabaperch.com/templates/field-types/file/
and it give lots of options for output
like mime
and size
, all very useful, but there's no datetime
listed ... I'd like to display the date of the upload if possible so that visitors know when the lastest pdf was uploaded.
I know I could just ADD a date field for the perch user to update with when the upload the new file, but that seems more like a hack. Plus, the page displays about 10 or so PDF's and I think that's a convoluted approach to something as simple as output="datetime"
so, if I missed this or there's another way to do it, let me know. Thanks.
Blake. Add <perch:showall/> to the template and see if one of the fields being output has the information your after. If so, you can use this data to create what you need.
Unfortunately I had already tried that ... only gave the options of
filepath
,mime
,size
, andfilename
... nodatetime
... I has hoping there was another way to do it, but I'm guessing there isn'tSorry, there's not an option for that - no one's ever asked for it before! It's possibly something we could add.
Drew, that would be wonderful ... sadly, I'm sure you've got bigger fish to fry and I shouldn't expect that feature anytime soon ... alas :)
I found a solution ... in the form of
Template filters
... here's my code!and then, in the template, I asked for the output of
path
came out right as rain ... you have to hard code the format
Y-m-d
, but it WORKED!