P
P
pavelkey2021-02-17 17:05:57
MODX
pavelkey, 2021-02-17 17:05:57

Is it possible to implement insertion of date, time and file size into a link?

Good afternoon!
I'm using MODX Revo.
I'm looking for a way that will allow me to add the date, time of publication, file size to the link in the "Content" field.

I will give an example of how I see it for myself:
1. In the "Content" field there is the text "Abstract on the topic of happiness", select and click the "Link" button.
2. Specify a link to the file and check the checkboxes "Insert date and time" + "Insert file size".
3. The link "Abstract on the topic of happiness (9 MB) 17.02.2021 17:10" is formed.

The task becomes more complicated for two reasons:
A) Inserting the date and file size should occur in any part of the page among the content, therefore, in my opinion, only suitable "Content" field, not a separate TV.
B) The process must be controlled, because not all files need this information.

If you have seen such an implementation or have opinions on the topic - please let us know!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Golyagin, 2021-02-25
​​@pavelkey

1. Snippet for displaying file size and extension
2. Formatting dates and times in MODX
3. Regular modifiers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question