Skip to main content

Step 3: Publish

Amplience imageAmplience image

In the create content step you created the banner and assigned it a delivery key. Now you'll publish the banner so that content can be retrieved from the CMS. You can read more about publishing concepts in the publishing and scheduling page.

Publish the banner
Link copied!

To publish the banner:

  • Choose "Publish" from the Save menu in the content form. You'll be asked if you want to publish the content.

Publishing the banner

info

When you publish a content item, if it's linked to other content, such as a carousel linked to carousel slides, then the content item and all of the content it is linked to would be published. The banner isn't linked to any other content, but it does contain an image and this will be published with the content.

When the content is published, the status icon will change to a green tick. This means that the latest version of the content is published. If you subsequently make a change to the content, the icon will change to a green cloud until the content is published again.

The publish status icon changes to a green tick

note

You can retrieve unpublished content from the CMS using virtual staging. This powers our visualization and preview features.

View the banner JSON
Link copied!

Now that the banner is published, you can retrieve it from the CMS. The consume step will explain this in more detail, but you can quickly view the JSON content for the banner directly from the content form.

  • Click the "i" icon to show the properties pane.

In the content delivery section, under "Content Delivery 2" there are two URLs: one labelled URL and one labelled Delivery Key URL. These URLs are configured to send a request to the content delivery API to retrieve the content, either by id or delivery key.

Click the delivery URL to send a request to the CMS to retrieve the content

The delivery URL will look something like the following:

https://docsportal.cdn.content.amplience.net/content/key/banner-example?depth=all&format=inlined

In the example the hub name is docsportal, but your URL will include the name of your hub. The domain for retrieving published content is cdn.content.amplience.net.

The URL will also include the delivery key you assigned to the content, in this example its banner-example, together with parameters to control the formatting of the JSON returned from the request.

  • Click the Delivery key URL. A request is sent to the CMS to retrieve the banner content in JSON format. Requesting the content by id will return exactly the same content.

The JSON is shown in your browser and should look something like the JSON shown below:

{
"content": {
"_meta": {
"name": "Code samples - Tutorial banner",
"schema": "https://schema-examples.com/tutorial-banner",
"deliveryKey": "banner-example",
"deliveryId": "e3173105-fc80-4f76-b5e5-821071256ba2"
},
"background": {
"image": {
"_meta": {
"schema": "http://bigcontent.io/cms/schema/v1/core#/definitions/image-link"
},
"id": "dff04dbe-8664-4531-bc9a-60e6f5df6fab",
"name": "Hero-Banner-720-model2",
"endpoint": "ampproduct",
"defaultHost": "cdn.media.amplience.net"
},
"alt": "Model wearing summer hat and dress"
},
"link": {
"url": "https://amplience.com/developers/docs",
"title": "Buy now"
},
"headline": "Surprise sale now on!",
"strapline": "A chance to update your wardrobe"
}
}

If you don't have an Amplience account yet and are just following along, you can see the JSON by clicking here.

tip

You can also find your hub name by choosing "Properties" from the settings menu.

The properties window shows the hub name and the hub id.

You won't need the hub id to retrieve content, it is used with the Content Management API.

Click the delivery URL to send a request to the CMS to retrieve the content

Now that the banner is published you can move on to the final step consuming the content.