calamaro
calamaro

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?

mjauvin
mjauvin

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

mjauvin
mjauvin

Here's the doc on overriding component partials:

https://octobercms.com/docs/cms/components#overriding-partials

klas.wirholm
klas.wirholm

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