Use new "thumbnail" TALES extension to generate images thumbnails
authorThierry Florac <thierry.florac@onf.fr>
Tue, 19 Jun 2018 17:13:05 +0200
changeset 708 b84e4de0c0ba
parent 707 eea3be9e9a93
child 709 4f6cca33ed8b
Use new "thumbnail" TALES extension to generate images thumbnails
src/pyams_content/reference/pictograms/zmi/templates/manager-selection.pt
--- a/src/pyams_content/reference/pictograms/zmi/templates/manager-selection.pt	Mon Jun 18 09:17:53 2018 +0200
+++ b/src/pyams_content/reference/pictograms/zmi/templates/manager-selection.pt	Tue Jun 19 17:13:05 2018 +0200
@@ -22,9 +22,9 @@
 					</a>
 				</div>
 				<div class="width-50 text-center pull-left margin-right-10">
-					<img tal:define="img i18n:pictogram.image"
-						 tal:condition="img"
-						 tal:attributes="src extension:absolute_url(img, '++thumb++48x48')" />
+					<tal:var define="img i18n:pictogram.image"
+							 condition="img"
+							 content="structure extension:thumbnail(img, 48, 48)" />
 				</div>
 				<span tal:content="i18n:pictogram.title">Title</span>
 			</div>
@@ -49,9 +49,9 @@
 					</a>
 				</div>
 				<div class="width-50 text-center pull-left margin-right-10">
-					<img tal:define="img i18n:pictogram.image"
-						 tal:condition="img"
-						 tal:attributes="src extension:absolute_url(img, '++thumb++48x48')" />
+					<tal:var define="img i18n:pictogram.image"
+							 condition="img"
+							 content="structure extension:thumbnail(img, 48, 48)" />
 				</div>
 				<span tal:content="i18n:pictogram.title">Title</span>
 			</div>