Working with Content
This is undoubtedly the most important part of Built.io Contentstack. This section lets you add, delete, or edit any piece of content on your website
Before we start working with entries, it is important to ensure that the required content types are in place. Refer to our guide on Content Types.
An entry is the actual piece of content that you wish to publish. Entries can be created for one of the available content types. In this section, we will understand how to add, edit, publish, unpublish, and localize an entry.
Select a content type
Entries are created by adding content to existing content types. Therefore, to create a new entry, click the Content link to view the list of content types available in your stack.
Content types come in two types: Single and Set. A Single content type can store just one entry, while Sets can have multiple entries.
Select the appropriate content type to arrive at the Create Entry page. The language selector link on the top-right corner of the page let’s you choose the language of the entry. By default, it is set to English (United States).
Each entry, irrespective of the content type, has a Title field. Enter relevant title for the content in this field. The Webpage content type also has a URL field. Here, you need to provide the relative path for the page, without the base URL. The Base URL is the consistent part of your site’s web address. So, for instance, http://www.YourSite.com is the base URL, and any path given after the base URL is the relative path (for example, /contact_us, /blog/new_post).
There may be additional fields, depending on the kind of content type created by the stack developer. Enter relevant content in all the available fields before saving or publishing it.
It is important to note that each field accepts a specific data type. To know more about the available fields and their respective data types, visit the Fields page.
You can add tags to an entry. This helps you filter or search your entries quickly.
Save or publish
Once the relevant content is added in the content type, click the Save or Publish button. If you choose the Publish option, the Publish Entry dialog box will appear. For more information on publishing entries, see Publish an Entry.
With Built.io Contentstack, editing an existing entry is an effortless task. You can change the site language to which an entry is mapped, choose to revert an entry to an earlier saved version, or simply edit the existing content.
Select a content type
To edit a new entry, select the content type to which the entry belongs. Click the entry title to edit it.
To change the site language in which the entry needs to be published, choose an option from the dropdown list available under the language selector. Saving an entry in another language will localize it. See Localize Entry for more info.
If you have created more than one versions of the entry, you can load content from an earlier or later saved version by simply selecting the appropriate version from the link given on the top-right corner. The information in all the fields will change depending on what was saved in that version.
You can edit the content of each field individually.
View entry URL
When you edit an existing entry, in the URL field, you will notice a tiny eyeball icon. Hovering on this icon displays the URL of the web page where the entry is published (for example, http//www.example-site.com/sample-page). Click this hovered link to visit the web page and view the entry.
If you have created multiple versions of an entry, you can compare any two versions side-by-side on the same screen. The color-coded comparison view helps you locate the difference between the two versions.
To compare versions of an entry, click on the entry and then on the Browse link located on the top-right corner of the page, against the current version number. This will display a list of all the previous versions of the entry. Hovering on a particular version will display two options – View and Compare. Clicking on the Compare option of a particular version will compare that version of entry to the version of entry that you are currently on. The screen that appears will display the two versions of the entry. At any point, you can change the versions that you want to compare.
To restore an earlier saved version of an entry, click on the entry and then on the Browse link located on the top-right corner of the page, against the current version number. This will display a list of all the previous versions of the entry. Hover on the desired version of entry and click on View. Click Save to make it the current (latest) version of the entry.
Once you create an entry, you can publish it to one of the available publishing environments. To publish an entry, add the required content on the entry page, and click Publish. You will notice a dialog box with the following publishing options:
- Publish At
If you have added multiple publishing environments for your site, you need to select the environment to which you wish to publish the entry. Common environments include staging, development, and production.
Select the language you wish to publish the entry in. This option is available only if multiple languages are added to your stack.
This option provides you with two sub-options – Publish Now and Publish Later.
'Publish Now' allows you to publish an entry immediately, whereas 'Publish Later' allows you to publish an entry at a later date/time. If you select the 'Publish Later' sub-option, a text box appears asking you to select the date and time of publishing. On clicking this text box, you will be prompted to enter the exact date, time (hour-min-sec), and the time zone.
If the reader selects a time zone that follows daylight saving time (DST), an option named 'Adjust daylight saving time' appears below it. Selecting this option will publish the content at the specified time with DST adjustments.
Note:The DST time difference is one hour.
Publish referenced entries
When publishing an entry, if there are any unpublished (draft) entries or assets referred within the entry, an alert message will be displayed that will list out all the unpublished entries and assets.
You can then choose to publish the entry with or without publishing all the referred entries/assets.
It is recommended that you always publish the entry along with its references. If you publish the entry without publishing the references, the referred items will not be displayed in the published entry on the specified environment.
You can create a duplicate copy of an existing entry in a few clicks. To achieve this, edit the entry that you wish to create a copy of. Click the More link located at the bottom of the page, and select Copy. This will open the copy of the entry on a new page. Clicking Save will create a copy of the entry.
Since Built.io Contentstack offers multi-language support, it allows you to create entries in languages different than the master language, that is., English (United States).
By default, an entry is saved in the master language—English (United States). Localizing an entry means making it available in another language. With Built.io Contentstack, you do not have to create a separate entry for each locale. You can localize an existing entry easily. The steps involved in localizing are explained below:
Edit the entry that you wish to localize.
Choose the language of your choice by using the language selector located on the top-right corner of the page.
Replace the existing content with the content in the desired language. As soon as you click Save, it creates a new localized copy of the same entry. This new copy then ceases to fetch data from the main entry in master language. So, any changes made to the entry in master language hereon will not have any impact on the localized copy.
Edit a localized entry
Localizing an entry does not create a separate item in the main list of entries. Under any given content type, you will only see the list of entries in the master language, that is, English (United States). Edit the required entry, and then select the language of your choice. You will then be able to view/edit the localized entry.
Once an entry has been saved in a different language, it becomes independent of the master language. Therefore, each language entry has a separate versioning system.
Note: The Content Manager can view or create content in multiple languages only if the languages are added to the stack by the Admin/Developer.
To export an existing entry, edit the entry that you wish to export. Click the More link located at the bottom of the page, and select Export. This will save the JSON file of the entry to your local storage system. Any changes made to this file will be retained when importing.
Built.io Contentstack allows you to import the data of existing entries. You can either create a new entry and import content, or you can edit an entry and replace the existing content by importing content.
To import content for a new entry, open the required content type and click + New Entry. Then click the Import link available on the bottom-right corner of the page, and select the appropriate JSON file. While importing, ensure that you have chosen the correct locale to import the file as a localized entry.
To import content for an existing entry, edit the required entry, and click the Import link to upload the JSON file.
Note:The content of the existing entry will be replaced with the new content available in the JSON file. Also, the import event will fail if the file you import contains references to other entries or assets outside the stack or is formatted incorrectly.
You can remove an entry from your web or mobile property by unpublishing it. To unpublish an existing entry, edit the entry, and click the Unpublish link located at the bottom of the page. Select the environment you wish to remove the entry from. If you wish to unpublish the entry automatically at a later date/time, select Unpublish At and select the date, time, and timezone for unpublishing the entry.