Skip to content

Instantly share code, notes, and snippets.

{% block head %}
{{ parent() }}
<meta name="description" content="{{ entry.body | trimit(400) }}" />
<link rel="canonical" href="{{ entry.url }}">
<meta name="author" content="{{ siteName }}">
<!-- Schema.org markup for Google+ -->
<meta itemprop="name" content="{{ entry.title }}">
<meta itemprop="description" content="{{ entry.body | trimit(400) }}">
<meta itemprop="image" content="{% if image %}{{ image.getUrl('large') }}{% endif %}">
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ siteName }}</title>
<link>{{ siteUrl }}</link>
<atom:link href="{{ craft.request.url }}" rel="self" type="application/rss+xml" />
<description><![CDATA[ {{ siteInfo.siteDescription }} ]]> </description>
<language>fr</language>
<pubDate>{{ now.rss }}</pubDate>
<lastBuildDate>{{ now.rss }}</lastBuildDate>
@richardsongo
richardsongo / Craft-Previous-Next-entries
Created September 17, 2015 21:20
How to link to previous/next entries in a section?
{# Set parameters for prev/next elements list #}
{% set params = craft.entries.section('blog').order('title asc') %}
{# Get the prev/next elements #}
{% set prevEntry = entry.getPrev(params) %}
{% set nextEntry = entry.getNext(params) %}
{# And make sure to only output the links if the element exists #}
<nav class="col">
{% if prevEntry %}<div class="nav-prev"><a href="{{ prevEntry.url }}"><i class="icomoon-chevron-left"></i> <span class="sub-title">Previous article</span> {{ prev.title }}</a></div>{% endif %}
@richardsongo
richardsongo / Craft-Previous-Next-entries
Created September 17, 2015 21:20
How to link to previous/next entries in a section?
{# Set parameters for prev/next elements list #}
{% set params = craft.entries.section('blog').order('title asc') %}
{# Get the prev/next elements #}
{% set prevEntry = entry.getPrev(params) %}
{% set nextEntry = entry.getNext(params) %}
{# And make sure to only output the links if the element exists #}
<nav class="col">
{% if prevEntry %}<div class="nav-prev"><a href="{{ prevEntry.url }}"><i class="icomoon-chevron-left"></i> <span class="sub-title">Previous article</span> {{ prev.title }}</a></div>{% endif %}