Share » Forums » Setup & design » Translation: disable for image, but...

Translation: disable for image, but enable for alt tag

Translation: disable for image, but enable for alt tag

Monday 13 November 2006 1:17:42 pm - 5 replies

Author Message

Ulrich L.

Tuesday 14 November 2006 12:20:02 pm

Nobody else had this problem before...?

Claudia Kosny

Tuesday 14 November 2006 1:19:25 pm

Hi Ulrich

Lacking a better idea I would set up an addition text line attribute in my objects that hold an image and adapt my templates accordingly. Unfortunately this gets nasty very quickly if you have several pictures in one object...

I think you should post an enhancement request as having translatable alt text is definitely a nice feature.

Claudia

Ulrich L.

Thursday 16 November 2006 1:50:44 am

Thanks, Claudia.

At the moment I think it would be a good idea to override the respective template (this is templates/content/datatype/view, right?) and to provide a new parameter, e.g. "my_alt_text".

Then the template should be modified in that way that the new parameter is tested for content. In case of any content it would be used, otherwise the default funcionality would act.
So I would be able to display anything I want as alt/title tag.

My problem is now, that I have failed so far to create a new custom parameter. Is there any documentation anywhere how to deal with this?

Claudia Kosny

Thursday 16 November 2006 6:04:05 am

Hi Ulrich

Use
{attribute_view_gui attribute=$node.object.data_map.<your image attribute> my_alt_text=$node.object.data_map.foo.content}

Then you have the content of the attribute foo (which should be a textline) in the variable $my_alt_text within the template for viewing an image, which is (as you said) usually \templates\content\datatype\view\ezimage.tpl.

Claudia

Ulrich L.

Thursday 16 November 2006 11:59:40 am

It turned out I only had problems with the old flow control syntax of the ezimage template. Evereything's fine now, implementation of the custom parameter was easy indeed!
It's very convenient now to deal with alt/title tag.
Thanks again for your help.

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

36 542 Users on board!

Forums menu