Forums / General / Templates and images...

Templates and images...

Author Message

Jerry Jalava

Monday 16 June 2003 3:23:30 am

Hi,
I would like to know how can I get only image variables (ie. Path) to templates? If I use attribute_view_gui it creates the hole image inserting line (<img src=...).

Regards,
Jerry

Karsten Jennissen

Monday 16 June 2003 4:54:10 am

Try the ezimage operator {"/subpathcurrentdesign/image.ext"|ezimage}

See
http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/terminology_basics/template_language

Karsten

Jerry Jalava

Monday 16 June 2003 6:27:58 am

Thanks for your reply, but...

That doesn't help me in this case. I should have been more specific... :)
This picture witch attributes I need is added in the same article class at the sametime it is published. So, I cannot specify the image with ezimage...

The name of my image attribute in article class is "Kirjoittaja_kuva" and identifier "kirjoittaja_kuva", so I need to know how to implement this picture with specific size to the template. Best would be fetching only the image path and using that inside hardcoded image tag in template...

Thanks,
Jerry

Helena Vauchez

Friday 20 June 2003 3:32:15 am

Hi Jerry
you can specify attributes for the img-tag like this:
{attribute_view_gui attribute=$content_version.data_map.<your_img_identifier> border_size=0 name="foo"}
look in design/standard/templates/content/datatype/view/ezimage.tpl to see the names of the possible attributes.
"name" for example is not there - so I wrote my own ezimage.tpl.

hope that helps
Helena

eZ debug

Timing: Jan 18 2025 02:54:53
Script start
Timing: Jan 18 2025 02:54:53
Module start 'content'
Timing: Jan 18 2025 02:54:54
Module end 'content'
Timing: Jan 18 2025 02:54:54
Script end

Main resources:

Total runtime0.6683 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.5078180.8516
Module start 'content' 0.00580.5624 770.3594521.2422
Module end 'content' 0.56820.1000 1,291.6016334.1172
Script end 0.6682  1,625.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.5595210.0002
Check MTime0.00140.2078210.0001
Mysql Total
Database connection0.00100.146410.0010
Mysqli_queries0.606390.72901990.0030
Looping result0.00170.25431970.0000
Template Total0.642696.220.3213
Template load0.00220.326720.0011
Template processing0.640595.840020.3202
Template load and register function0.00020.031410.0002
states
state_id_array0.00090.131710.0009
state_identifier_array0.00070.107920.0004
Override
Cache load0.00170.2616270.0001
Sytem overhead
Fetch class attribute can translate value0.00120.180640.0003
Fetch class attribute name0.00100.143740.0002
XML
Image XML parsing0.00080.114140.0002
class_abstraction
Instantiating content class attribute0.00000.001740.0000
General
dbfile0.00290.4291210.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs