3

I have integrated the ECL( External Content library) to the Tridion. Here i have three basic ECL item named as Image,Video,Document.

Now for every ECL item we have created the External metadata by overriding the MetadataXMl property from IContentLibraryMultimediaItem Interface. so every time when we access the item we can have meta data from the External Library.

I have scenario where author want to have different meta data of same ecl item. say for example one image call product.jpg is used on the product list page as thumbnail and on the detail page as large image.

As ecl item is same on both the place.but they have render as different rendition on the page with diffrent purpose. so alt text for both place for same ecl item can be diffrent.

so how we can have different metadata for one ecl item placed on the page in the different section.

Regards, Gaurav

2 Answers 2

4

You can create groups in your metadata.

IFieldGroupDefinition thumbnail = YourProvider.HostServices.CreateFieldGroupDefinition("Thumbnail", Resources.MetadataPrograms, maxOccurs: null);
programs.Fields.Add(YourProvider.HostServices.CreateNumberFieldDefinition("Description", "The description"));

If you name the group according to the rendition your templating code will be able to find the metadata for the rendition it is currently rendering.

2
  • Thank you for the reply. I have doubt over can we have different metadata for same ECL item. say for example if we image ecl item on two different place. then how we can have different meta data for ecl item according to page section. Jan 27, 2015 at 12:13
  • You cannot. You can add multiple groups in your metadata(or just use different names - for example have both a "FullAltText" and a "ThumbnailAltText" field). Jan 27, 2015 at 13:45
0

With or without ECL the "correct" place to store alt text is in the context an image is used, just as you describe.

If the ECL item is not on the page, then you could model this with a Component that includes the alt text and links to the ECL item.

The main reason having alt text on Multimedia (or ECL) items works is because images aren't always used in multiple contexts or the alt text is generic enough to be okay across contexts (e.g. based on the product name).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.