Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Alt text for an image in my document types View modes: 
User avatar
Member
Member
ckelly-safefood - 2/11/2013 4:12:20 AM
   
Alt text for an image in my document types
Hi,

Im using Kentico 6 on my site. I have a 1000+ page website, with a lot of different document types containg a lot of image fields. For accessibilty, id like to be able to/force authors to, add in some alt text for each image.

Is this possible? I dont need a full detailed answer, just some idea so I can bring it to our developers.

Thanks,

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/13/2013 11:27:16 PM
   
RE:Alt text for an image in my document types
Best bet would be to just set the property/attribute value you want in the transformation. On the Form tab of a CMS.File you can set the "file name" property and/or description. Then in your transformation you can simply set the
alt/title="<%# Eval("FileName") %>"
and it will render what the user has entered.

If you want to force users to enter a value, simply make the field required in the CMS.File document type.

Best of luck!

User avatar
Member
Member
ckelly-safefood - 2/14/2013 5:11:16 AM
   
RE:Alt text for an image in my document types
Hi Froggy,

Thanks for that. I think I know what you mean. I think I can edit the transformation ok. But in the document type, do I create a new attribute in the Fields tab?

I see how I can make it a required field, but what of the few hundred already existing documents that are going to have this new empty, but required field? (Obviously I am willing to manually fill them in, but before that it wont mess them up will it?)

Thanks,

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 2/16/2013 9:34:58 AM
   
RE:Alt text for an image in my document types
Hi,

you can set this property via some simple SQL script/query which will handle all of old documents.

Best regards,
Martin Danko

User avatar
Member
Member
ckelly-safefood - 2/18/2013 3:36:49 AM
   
RE:Alt text for an image in my document types
Okay, thanks all.

That's enough for me to start with.