Include canonical URL in page header
authorThierry Florac <thierry.florac@onf.fr>
Fri, 22 Jun 2018 13:00:54 +0200
changeset 59 6f9d8090cf16
parent 58 c7197827a864
child 60 d278339fed54
Include canonical URL in page header
src/pyams_default_theme/templates/layout.pt
src/pyams_default_theme/templates/preview-layout.pt
--- a/src/pyams_default_theme/templates/layout.pt	Wed Jun 20 18:14:59 2018 +0200
+++ b/src/pyams_default_theme/templates/layout.pt	Fri Jun 22 13:00:54 2018 +0200
@@ -15,6 +15,8 @@
 		<link rel="icon" tal:attributes="href url" type="image/x-icon">
 	</tal:if>
 
+	<link rel="canonical" tal:attributes="href extension:canonical_url(context)" />
+
 	<tal:var replace="extension:resources" />
 
 	<!-- Javascript extensions -->
--- a/src/pyams_default_theme/templates/preview-layout.pt	Wed Jun 20 18:14:59 2018 +0200
+++ b/src/pyams_default_theme/templates/preview-layout.pt	Fri Jun 22 13:00:54 2018 +0200
@@ -15,6 +15,8 @@
 		<link rel="icon" tal:attributes="href url" type="image/x-icon">
 	</tal:if>
 
+	<link rel="canonical" tal:attributes="href extension:canonical_url(context)" />
+
 	<tal:var replace="extension:resources" />
 
 	<!-- Javascript extensions -->