I´ve got <meta http-equiv="Refresh" content="[[*page-refresh-time]]"> in my template head. User can set page refresh time if wanted. If time is empty this block not shown on page.
Trying to output page refresh time. This calculates value to minutes and works well:
[[*page-refresh-time:is=``:then=`
`:else=`
<section class="container">
<p><small>Page is updated every <mark>[[*page-refresh-time:divide=`60`]] minutes!</mark></small></p>
<div class="progress2 progress-moved"><div class="progress-bar2"></div>
</section>
`]]
Now I want that it not show when tv is empty, shows result in seconds under value 60 and shows results in minutes to 60 and above values. It would be nice if minute result could be rounded in two decimals.
Damn! I think it would be easy output modifier thing.
My skills are just not creating custom output modifier level. I think original output is good enough for my use.
You ROCK! This outputs just like it should, more than expected, calculates and outputs minutes and seconds nicely! Thank you so very much! This is why I love Modx. With skills you can do anything without any hassle!
I know this is easily done with JavaScript, but I have minimal project (Pico css+Modx3) going on my webpages. That´s why wanted output modifier for this thing. So far pages running without any JavaScript, only html, css and php (plugin that gets random image from my Piwigo gallery to Modx).
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.