Blog Sections Open
Using jquery-timeago with Evolution CMS Dates
A lightweight frontend enhancement for showing relative publication times such as “5 minutes ago” using Evolution CMS date output and the jquery-timeago plugin.
Relative time labels such as “1 minute ago” or “3 hours ago” make dynamic sections feel more alive. The donor post showed how to pair Evolution CMS date placeholders with the jquery-timeago plugin to get that effect with very little code.
The basic integration
<script src="jquery.min.js"></script>
<script src="jquery.timeago.js"></script>
<script src="locales/jquery.timeago.ru.js"></script>
Then render a timestamp in a format the plugin can read:
<span class="time" title="[[*createdon:strtotime:date=`%c`]]">
[[*createdon:strtotime:date=`%A, %d %B %Y`]]
</span>
Why this was useful
- simple progressive enhancement for news or comment streams
- easy localization through the plugin’s locale files
- works with existing Evolution CMS date placeholders
Rendering a TV Row Only When the TV Has a Value
A neat manager-side pattern for putting conditional presentation directly into the TV configuration so templates stay cleaner and output only appears when the field is filled.
Passing Parameters into Chunks with parseChunk in Evolution CMS
A reusable parser pattern for avoiding dozens of one-off helper snippets when you only need to inject values into a chunk template.