Media gallery widgets-config.xml definition
Like all IBM Connections widgets, the media gallery widget is defined in the widgets-config.xml configuration file. The definition contains some properties you can edit to customize media galleries, including the list of allowed file types:
<widgetDef defId="MediaGallery" bundleRefId="lc_clib" prerequisite="files" description="MediaGallery_description"uniqueInstance="true" url="{newsSvcRef}/widgets/lw/static/{version}!{locale}/MediaGalleryWidget_CMIS.xml" helpLink="{helpSvcRef}/topic/com.ibm.lotus.connections.communities.help/media_gallery_frame.html" modes="view edit fullpage" primaryWidget="false" iconUrl="{newsSvcRef}/widgets/lw/images/mediaGalleryIcon.png"> <itemSet> <item name="svcDocUrl" value="{filesSvcRef}/form/cmis/community/{resourceId}/owned/servicedoc" /> <item name="svcDocUrlAnon" value="{filesSvcRef}/form/anonymous/cmis/community/{resourceId}/owned/servicedoc" /> <item name="svcContext" value="{filesSvcRef}" /> <item name="rootCategory" value="library" /> <item name="category.folder" value="false" /> <item name="validPhotoExts" value="jpg,jpeg,gif,png" /> <item name="validVideoExts" value="mp4,mov,flv" /> <item name="widgetEnv" value="Connections" /> <item name="mg_typesToShow" value="photos_and_videos" /> <item name="mg_photoType" value="ada30772-31fe-44bf-b8b4-dd7e4f072cd6" /> <item name="mg_videoType" value="ada30772-31fe-44bf-b8b4-dd7e4f072ad6" /> <item name="mg_fileUrl" value="{contextRoot}/service/html/communityview?communityUuid={resourceId}#fullpageWidgetId={widgetId}&file={objectTypeId}!{fileUuid}" /> </itemSet> </widgetDef>You can optionally edit the following items:
- In the validPhotoExts and validVideoExts items you can edit the list of allowed photo or video file extensions. The extensions in these lists by default are the only currently supported extensions. See the Supported media formats in Media Gallery technote for the official list of supported extensions. See Setting allowed media gallery file extensions.
- In the mg_typesToShow item you can edit the default the default selection in the list of object types users can choose from when adding a media gallery to their community. The selection determines whether the media gallery will contain photos only, videos only, or photos and videos. All three options are always available; this property only controls which one is selected by default. For example, if your media galleries will only display photos you could set the default as photos only, and then users won't have to select it when they add a media gallery to their community. See Setting the object types available when adding a media gallery.
- In the mg_photoType and mg_videoType items you can specify custom object types as the default templates selected when users create media galleries. See Setting custom media gallery object types as default selections.
See Use the widgets-config.xml file for Communities for steps on checking the widgets-config.xml file out and in again.
Parent topic
Configure media galleries
Related tasks
Use the widgets-config.xml file for Communities
Setting allowed media gallery file extensions
Setting the object types available when adding a media gallery
Setting custom media gallery object types as default selections