Use new "media" TALES renderer
authorThierry Florac <tflorac@ulthar.net>
Fri, 21 Dec 2018 16:45:31 +0100
changeset 300 f20595749ba6
parent 299 66ef165934a9
child 301 93875f62e559
Use new "media" TALES renderer
src/pyams_default_theme/component/gallery/templates/renderer-carousel.pt
src/pyams_default_theme/component/gallery/templates/renderer-default.pt
--- a/src/pyams_default_theme/component/gallery/templates/renderer-carousel.pt	Fri Dec 21 13:57:53 2018 +0100
+++ b/src/pyams_default_theme/component/gallery/templates/renderer-carousel.pt	Fri Dec 21 16:45:31 2018 +0100
@@ -16,7 +16,7 @@
 			 class="item ${'active' if repeat.image.start() else None}">
 			<tal:var define="image_data i18n:image.data;
 							 alt i18n:image.title;">
-				${structure:tales:picture(image_data, alt=alt)}
+				${structure:tales:media(image_data, alt=alt)}
 			</tal:var>
 			<div class="carousel-caption">
 				<h3>${i18n:image.title}</h3>
--- a/src/pyams_default_theme/component/gallery/templates/renderer-default.pt	Fri Dec 21 13:57:53 2018 +0100
+++ b/src/pyams_default_theme/component/gallery/templates/renderer-default.pt	Fri Dec 21 16:45:31 2018 +0100
@@ -15,8 +15,8 @@
 		   tal:define="image_data i18n:image.data;
 					   alt i18n:image.title;"
 		   href="${tales:absolute_url(image_data)}">
-			${structure:tales:picture(image_data, lg_width=3, md_width=4, sm_width=4,
-									  xs_width=6, css_class='img_responsive', alt=alt)}
+			${structure:tales:media(image_data, lg_width=3, md_width=4, sm_width=4,
+									xs_width=6, css_class='img_responsive', alt=alt)}
 		</a>
 		<div class="author">${i18n:image.author}</div>
 	</div>