diff --git a/components/post/default.htm b/components/post/default.htm index 26b0b4f7..c7b1c790 100644 --- a/components/post/default.htm +++ b/components/post/default.htm @@ -1,6 +1,6 @@ {% set post = __SELF__.post %} -
- Posted - {% if post.categories.count %} in - {% for category in post.categories %} - {{ category.name }}{% if not loop.last %}, {% endif %} - {% endfor %} + {% if post.categories.count %} + {% set categoryLinks = post.categories | map(c => "#{c.name}") | join(', ') %} + + {{ 'rainlab.blog::lang.post.posted_byline' | trans({ + date: post.published_at | date('rainlab.blog::lang.post.date_format' | trans), + categories: categoryLinks + }) }} + {% else %} + {{ 'rainlab.blog::lang.post.posted_byline_no_categories' | trans({ + date: post.published_at | date('rainlab.blog::lang.post.date_format'|trans) + }) }} {% endif %} - on {{ post.published_at|date('M d, Y') }}
diff --git a/components/posts/default.htm b/components/posts/default.htm index 8c8a06d2..67963899 100644 --- a/components/posts/default.htm +++ b/components/posts/default.htm @@ -6,15 +6,21 @@- Posted - {% if post.categories.count %} in {% endif %} - {% for category in post.categories %} - {{ category.name }}{% if not loop.last %}, {% endif %} - {% endfor %} - on {{ post.published_at|date('M d, Y') }} + {% if post.categories.count %} + {% set categoryLinks = post.categories | map(c => "#{c.name}") | join(', ') %} + + {{ 'rainlab.blog::lang.post.posted_byline' | trans({ + date: post.published_at | date('rainlab.blog::lang.post.date_format' | trans), + categories: categoryLinks + }) }} + {% else %} + {{ 'rainlab.blog::lang.post.posted_byline_no_categories' | trans({ + date: post.published_at | date('rainlab.blog::lang.post.date_format' | trans) + }) }} + {% endif %}
-{{ post.summary|raw }}
+{{ post.summary | raw }}
{% else %}