Forums / Developer / Image size override possible?
K259
Wednesday 07 January 2004 1:34:48 am
Today in eZ publish we got 3 different image size possibilites: small, medium and large
I want the imagesize "SmallSizeWidth" to be 150pix instead of 100 for only a couple of nodes? Is it possible to override this in any override.ini or image.ini files?
Georg Franz
Wednesday 07 January 2004 6:16:15 am
Hi,
yep, it's possible. Use the image.ini.append.
--- example image.ini.append ---
[AliasSettings] # Defines a list of aliases that are available to # the template engine and other clients. # The alias must be defined as a separate INI block. AliasList[] AliasList[]=reference AliasList[]=small AliasList[]=medium AliasList[]=largeAliasList[]=rss
[small]Filters[]=geometry/scaledownonly=150;150
# Define customized image size [ImageSizes] Height[small]=150 Width[small]=150 Height[medium]=100 Width[medium]=150 Height[large]=400 Width[large]=300 Height[reference]=600Width[reference]=600
Kind regards,Emil.
Best wishes, Georg. -- http://www.schicksal.com Horoskop website which uses eZ Publish since 2004
Wednesday 07 January 2004 6:30:54 am
Hmm..I don't see where you make an Imagesize override to any node here..
I'll explain.I have a class x, class z and class y. These uses all the Imagesize small(100 in width) for displaying uploaded pictures.
Everywhere in the structure these classes shall have Imagesize 100(small), but in node a, b, c and d the displayed images shall have Imagesize 150 pix.
Do I have to make an override file (full_node_a.tpl etc.) for every node I want to make this pict. larger, and in image.ini create another size, or is it possible in image.ini to set an small-imagesize override for these nodes?
Paul Borgermans
Wednesday 07 January 2004 6:58:08 am
No,
image.ini is not meant for overrides, it defines what image sizes/classes are available.
You will have to create an override template for these "special nodes". You may assign them all to a new section, that way you need only one template file/rule in override.ini.
Alternatively, you could add a flag "show image as smaller" to your class definition and use that in your template to determine the image size.
hth
-paul
eZ Publish, eZ Find, Solr expert consulting and training http://twitter.com/paulborgermans
Wednesday 07 January 2004 7:12:35 am
Tnx. Think I go for the last one.
..or else I also have to change the role-permission if I assign this override-template to a new section for some nodes. It's only going to be a mess in the permission-system if I do so ;)