How do I use images for links?

Author Message

Mike Borozdin

Monday 01 December 2003 6:24:02 am

How do I use images for folders links?????????

Aya Brea

Monday 01 December 2003 8:51:03 am

Add new attribute to the folder class, the type is image. Then you can make the link easily...

Mike Borozdin

Thursday 04 December 2003 10:31:51 am

Ok!

Thanks! I added a new attribute to the Folder class. But how can I make image appear in links????

I wrote this:

{let folder_list=fetch( content, list, hash(
parent_node_id, 2,
sort_by, array( array( priority ) ) ) )}

{section name=Folder loop=$folder_list}
<td class="topmenu">
<a href={concat( "/content/view/full/", $Folder:item.node_id, "/" )|ezurl}><img src="{$Folder:item.image|ezimage}" /></a>
</td>
{/section}
{/let}

But it doesn't work!

Adolfo Barragán

Friday 05 December 2003 11:15:44 pm

You must use the image attribure like other attributes of class. So your code must be:

<a href={concat( "/content/view/full/", $Folder:item.node_id, "/" )|ezurl}>{attribute_view_gui attribute=$Folder:item.data_map.image image_class=small}</a>

the image_class param can be small, or medium or large.

Regards
Adolfo Barragán

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 31 2025 03:43:04
Script start
Timing: Jan 31 2025 03:43:04
Module start 'layout'
Timing: Jan 31 2025 03:43:04
Module start 'content'
Timing: Jan 31 2025 03:43:04
Module end 'content'
Timing: Jan 31 2025 03:43:04
Script end

Main resources:

Total runtime0.0223 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.1250151.2109
Module start 'layout' 0.00460.0034 739.3359220.6875
Module start 'content' 0.00810.0125 960.0234997.6484
Module end 'content' 0.02060.0017 1,957.671933.9922
Script end 0.0223  1,991.6641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002812.4038140.0002
Check MTime0.00114.9997140.0001
Mysql Total
Database connection0.00073.047910.0007
Mysqli_queries0.00177.730630.0006
Looping result0.00000.044810.0000
Template Total0.00125.410.0012
Template load0.00094.063810.0009
Template processing0.00031.293410.0003
Override
Cache load0.00062.805610.0006
General
dbfile0.00114.856780.0001
String conversion0.00000.039540.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