Skip to content

Latest commit

 

History

History
98 lines (81 loc) · 2.87 KB

File metadata and controls

98 lines (81 loc) · 2.87 KB

Manual Installation

Register Extension

This extension needs to be registered against a Hub with in the Dynamic Content application (Developer -> Extensions), for it to load within that Hub.

Setup

Property Value
Category Content Field
Label Media Gallery
Name media-gallery (needs to be unique with the Hub)
URL Your hosted HTTPS location for the extension
Description Media Gallery (can be left blank, if you wish)

Note: You can use our deployed version of this extension (builds from the "production" branch) at https://dc-extension-media-gallery.dc-demostore.com/.

As this is an open source project you're welcome to host your own "fork" of this project. You can use any standard static hosting service (Netlify, Amplify, Vercel, etc.) if you wish.

Permissions

This extension requires no additional permissions.

Example extension snippet

Here is a minimal example snippet with no metadata fields:

{
	"type": "object",
	"ui:extension": {
		"name": "media-gallery",
	},
	"properties": {
		"galleryConfig": {
			"title": "Gallery Config",
			"type": "object",
			"properties": {
				"repoId": {
					"title": "Import Repo ID",
					"description": "Repository ID used for the last import",
					"type": "string"
				},
				"folderId": {
					"title": "Import Folder ID",
					"description": "Folder ID used for the last import",
					"type": "string"
				},
				"query": {
					"title": "Import Query",
					"description": "Query used for the last import",
					"type": "string"
				}
			},
			"propertyOrder": []
		},
		"photoGallery": {
			"title": "Photos",
			"type": "array",
			"minItems": 0,
			"maxItems": 100,
			"items": {
				"type": "object",
				"title": "Photo",
				"properties": {
					"photo": {
						"title": "Photo",
						"allOf": [
							{
								"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/image-link"
							}
						]
					},
					"date": {
						"title": "Date",
						"type": "string"
					}
				},
				"propertyOrder": []
			}
		}
	}
}

Setting up the Snippet in DC

Extension Snippets are an easy way to add extensions to content types while allowing you to easily change the extension url and base extension properties from one spot.

You can find a snippet to use for this extension above. Recommended description:

Add a media gallery to this content item. This allows content authors to build galleries of images in their content items, along with storing relevant metadata.

You can even add your locally hosted media gallery extension this way for development, though note that it expects the extension url to be https. Our hosted version is a quick way to access the current version of the extension:

https://dc-extension-media-gallery.dc-demostore.com/