Article information
Article relates to
Sitefinity 3.2
Created by
Vassil Daskalov
By default, you are able to add Description to items in the Custom and Document library types. However, this option is not available for the Image library items. Adding a description to images is a pretty easy task and can be achieved in three steps: 1. Add the Description meta field for the Image library type. The needed meta field is already declared in the database and set to be used for the Custom and Document library types. This is why, you only need to set it to for the Image library type in the application web.config like this:
2. Open the ~/Sitefinity/Admin/ControlTemplates/Libraries/ControlPanelEdit_Image.ascx template and add a TextBox with ID equal to the name of the meta field, that is, "Description". Be careful to add this control inside the ContentMetaFields control:
The result should look like this: 3. Open the template used by the Image Gallery control and add a Label so that the description is displayed in the public part. For example, if the control is set to show the images in List & Page mode, you need to add an ITextControl field with ID "Description" in the ~/Sitefinity/ControlTemplates/Libraries/GalleryListViewTemplate.ascx template.