Hi all,
I'd like to add a meta-tag to my page-template that always displays the actual date, like this:
<meta name="date" content="Mon, 11 Sep 2017 17:22:44 +0200">
How would I achieve that? Any help is appreciated big time.
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Hi all,
I'd like to add a meta-tag to my page-template that always displays the actual date, like this:
<meta name="date" content="Mon, 11 Sep 2017 17:22:44 +0200">
How would I achieve that? Any help is appreciated big time.
Add this code into your template:
<meta name="date" content="{{ now|date('r') }}">
Thank you so much for the enlightenment and I promise to dig deeper into the Twig documentation in the future.
Log in to reply.
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 4 | 195 | 2 months ago | ||
| 3 | 91 | 2 months ago | ||
| 11 | 451 | 3 months ago | ||
| 0 | 45 | 3 months ago | ||
| 5 | 125 | 3 months ago |