This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

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
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

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.