Forums / Suggestions / More foolproof base/embed/image.tpl in 3.4
Ekkehard Dörre
Thursday 21 October 2004 9:30:14 am
Hi,
embedding image in article with
<object id="146" />
and without size="(e.g.)large" failed because of not foolproof imagesize check.old:
<div class="content-view-embeddedmedia"> <div class="class-image"> <div class="attribute-image"> {let href="" target="_self"} {section show=is_set($object_parameters.href)} {set href=$object_parameters.href} {/section} {section show=is_set($object_parameters.target)} {set target=$object_parameters.target} {/section} <p>{attribute_view_gui attribute=$object.data_map.image image_class=$object_parameters.size href=$href target=$target}</p> {/let} </div> <div class="attribute-caption" style="width: {$object.data_map.image.content[$object_parameters.size].width}px"> {attribute_view_gui attribute=$object.data_map.caption} </div> </div> </div>
new:
<div class="content-view-embeddedmedia"> <div class="class-image"> {let href="" target="_self" imagesize="medium"} <div class="attribute-image"> {section show=is_set($object_parameters.href)} {set href=$object_parameters.href} {/section} {section show=is_set($object_parameters.target)} {set target=$object_parameters.target} {/section} {section show=is_set($object_parameters.size)} {set imagesize=$object_parameters.size} {/section} <p>{attribute_view_gui attribute=$object.data_map.image image_class=$imagesize href=$href target=$target}</p> </div> <div class="attribute-caption" style="width: {$object.data_map.image.content.[$imagesize].width}px"> {attribute_view_gui attribute=$object.data_map.caption} </div> {/let} </div> </div>
Greetings, ekke
http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing