image in link?

Author Message

mario feichtinger

Friday 25 July 2003 12:29:11 am

hello!
how can i get an image into a link?
like this <a href="{attribute_view_gui attribute=$node.object.data_map.downloadbild}">Download</a>
which possibilities i have for this problem? should i create a new datatype, or only need a override template for ezimage.tpl?
please help!!!
mario

Alex Jones

Friday 25 July 2003 6:39:15 am

You should be able to use an override template. Simply add the appropriate eZ code to your template to display the image instead of, or in addition to the text.

An example of how to display the image would be to use:
{attribute_view_gui attribute=$content_version.data_map.image image_class=large}

Assuming the field in your class is titled "image". If it is something else change data_map.image to data_map.the_proper_field_name.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Tony Wood

Friday 25 July 2003 9:43:11 am

Hey Mario,

You might want to try the tag

<object id="id"[ align="left|right|center" size="small|medium|large" class="foo" view="embed|text_linked" href="link url" target="_self|_blank"]/> where 'id' should be an existing eZ object id and all other attributes are optional. Attributes 'href' and 'target' are used to make object(image) as link.

from http://ez.no/manual/user/everyday#Tags
This is new to 3.1

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

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 18 2025 11:36:06
Script start
Timing: Jan 18 2025 11:36:06
Module start 'layout'
Timing: Jan 18 2025 11:36:06
Module start 'content'
Timing: Jan 18 2025 11:36:07
Module end 'content'
Timing: Jan 18 2025 11:36:07
Script end

Main resources:

Total runtime1.3952 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.8984152.6094
Module start 'layout' 0.00630.0043 741.507839.3984
Module start 'content' 0.01061.3826 780.9063576.3203
Module end 'content' 1.39330.0019 1,357.226612.2031
Script end 1.3952  1,369.4297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2363160.0002
Check MTime0.00130.0943160.0001
Mysql Total
Database connection0.00120.088610.0012
Mysqli_queries1.341996.1791590.0227
Looping result0.00060.0462570.0000
Template Total1.351596.920.6757
Template load0.00190.136220.0009
Template processing1.349696.726820.6748
Template load and register function0.00020.015310.0002
states
state_id_array0.00170.119510.0017
state_identifier_array0.00210.149220.0010
Override
Cache load0.00150.1073230.0001
Sytem overhead
Fetch class attribute can translate value0.00110.080730.0004
Fetch class attribute name0.00160.118050.0003
XML
Image XML parsing0.00110.076930.0004
class_abstraction
Instantiating content class attribute0.00000.000850.0000
General
dbfile0.00090.0658220.0000
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs