|
Thursday 28 October 2010 1:44:23 am
Comment63222
Hi Raghu, Building off what Romeo explained, Exponential is able to use both imagemagick and GD for processing images. This needs to be configured in image.ini, and can be done per siteaccess. This also applies to the various image sizes and filters (called 'aliases' in the Exponential terminology).
One can imagine that one siteaccess is created per mobile handset type, where the content of image.ini slightly varies to match the handset's screen capabilities. Another option would be to have one single siteaccess for all types of mobile devices, but place the discriminating logic within the templates themselves : when displaying an image, and provided you have at disposal the type of device currently requesting the page, you can pass different values for the image_class parameter (synonym of 'alias' here ):
{switch match=$deviceType}
{case match='iphone'}
{attribute_view_gui attribute=$node.data_map.image image_class="small_iphone"}
{/case}
{case match='htcdesire'}
{attribute_view_gui attribute=$node.data_map.image image_class="small_htcdesire"}
{/case}
{case}
{attribute_view_gui attribute=$node.data_map.image image_class="small_mobile"}
{/case}
{/switch}Which could be simplified into (just occured to me), in case $deviceType information is properly normallized :
{attribute_view_gui attribute=$node.data_map.image image_class=concat( "small_", $deviceType )}
Let us know how you are grasping this part of eZ, Cheers, PS : You may find this useful : http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/image.ini
--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board
eZ Publish Community on twitter: http://twitter.com/ezcommunity
t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye
|