Share » Forums » Setup & design » Need automatic ALT-tag to comply with...

Need automatic ALT-tag to comply with standards..

Need automatic ALT-tag to comply with standards..

Tuesday 22 March 2005 3:12:30 am - 2 replies

Author Message

Bård Farstad

Wednesday 23 March 2005 1:53:21 am

Valentin,

try looking at the template (or your override template) for the image datatype:
design/standard/templates/content/datatype/view/ezimage.tpl

--bård

Documentation: http://ez.no/doc

Valentin Svelland

Monday 28 March 2005 2:28:49 pm

Thanks, most helpful. Still I'm having trouble fetching the name of the image to fit into the alt-tag as you can see at the end of the longest line in this code (override/templates/content/datatype/view/ezimage.tpl):

{section show=and(first_set($attribute.content,true()),first_set($attribute.content.contentobject_attribute_id,false()))}
  {default image_class=original
           alignment=false()
           hspace=false()
           border_size=0}
  {let image_content=$attribute.content
       image=$image_content[$image_class]}
     <img src={$image.full_path|ezroot} width="{$image.width}" height="{$image.height}" {section show=$hspace}hspace="{$hspace}"{/section} {section show=$alignment}align="{$alignment}"{/section} border="{$border_size}" alt="{* I WANT TO PUT IN IMAGE NAME HERE*}" />
  {/let}
  {/default}
{/section}

------------------------
I made eZ run on www.eigersund.kommune.no, bjerkreim.kommune.no, lund.kommune.no and sokndal.kommune.no. Municipalities should use open source!

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu