Image size override possible?

Author Message

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[]=large
AliasList[]=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]=600
Width[reference]=600

Kind regards,
Emil.

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

K259

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

K259

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 ;)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 03:43:06
Script start
Timing: Jan 19 2025 03:43:06
Module start 'layout'
Timing: Jan 19 2025 03:43:06
Module start 'content'
Timing: Jan 19 2025 03:43:06
Module end 'content'
Timing: Jan 19 2025 03:43:06
Script end

Main resources:

Total runtime0.0137 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 590.2734152.6250
Module start 'layout' 0.00500.0027 742.898439.4453
Module start 'content' 0.00770.0042 782.343893.3203
Module end 'content' 0.01190.0017 875.664134.3047
Script end 0.0136  909.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002216.1063140.0002
Check MTime0.00117.7114140.0001
Mysql Total
Database connection0.00096.276210.0009
Mysqli_queries0.002417.349730.0008
Looping result0.00000.102910.0000
Template Total0.001510.710.0015
Template load0.00085.756510.0008
Template processing0.00074.872310.0007
Override
Cache load0.00053.430210.0005
General
dbfile0.00032.005480.0000
String conversion0.00000.218040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs