Forums / General / How do I use images for links?

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