This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi, I'm using the RainLab Blog and wonder if there's a variable or possibility to print an output like "Posted 3 seconds/hours/days ago" instead of printing the full date when the blog post was issued.
Any hints on this?
Just override the blogPost component's "default.htm" partial to do this.
https://github.com/rainlab/blog-plugin/blob/master/components/post/default.htm
Last updated
Here's the doc on overriding component partials:
https://octobercms.com/docs/cms/components#overriding-partials
You need to make your own partials for al the blog pages and then change the date forma were it says days ago, to something like: date('Y-m-d') ore date('Y-m-d\TH:i:sP'), if you want time, also.
1-4 of 4