Use new "thumbnail" TALES extension to generate images thumbnails
authorThierry Florac <thierry.florac@onf.fr>
Tue, 19 Jun 2018 17:10:57 +0200
changeset 56 5f1c114f4464
parent 55 ab81e4954e66
child 57 fc86c86eb416
Use new "thumbnail" TALES extension to generate images thumbnails
src/pyams_default_theme/shared/logo/templates/logos-default.pt
--- a/src/pyams_default_theme/shared/logo/templates/logos-default.pt	Mon Jun 18 09:27:59 2018 +0200
+++ b/src/pyams_default_theme/shared/logo/templates/logos-default.pt	Tue Jun 19 17:10:57 2018 +0200
@@ -4,10 +4,7 @@
 		<tal:if condition="logo is not None">
 			<a tal:omit-tag="not:logo.url"
 			   tal:attributes="href logo.url" target="_blank">
-				<img class="thumbnail margin-10"
-					 tal:define="thumbnails extension:thumbnails(logo.image);
-								 thumbnail thumbnails.get_thumbnail('200x200');"
-					 tal:attributes="src extension:absolute_url(thumbnail)" />
+				<tal:var content="structure extension:thumbnail(logo.image, 200, 'auto', 'display-inline margin-10')" />
 			</a>
 		</tal:if>
 	</tal:loop>