Content Models are the building blocks for the construction of a webpage. In fact, the Content Models are the CMS part of a dynamic webpage that allows the management of contents inside the page.
Since a webpage can contain different kinds of contents, for example texts, dates, images, numbers, several so called Attributes constitute a Content Model. Attributes are of specific types, each of them allowing the insertion of a specific content inside the page.
Content Models in Z-CMS can be created on two levels, on the Global level for those models that can be used by more than one site inside Z-CMS and on a Site level for models needed inside one single site only.
Creation of a Content Model
Creation of a Content Models follows the same rules both in case of a Global Content Model and in case of a Content Model built for a specific site. The only thing that changes is the starting point, inside the Global part, or inside one of the sites stored in Z-CMS.
A Site level Content Model can be created in the following way. From the Site dashboard page select the label from the menu on the left of the page and then click the button at the top of the page. A new page with fields summarized in the following table appears.
Field ( * denotes mandatory field) Description Name* A unique name to identify the Content Model Display Name A user-friendly name for the Content Model which enables user to identify the Content Model easily inside the Content Manager and in the Content Model list Comments Comments Is Active* Only active Content Models will be available inside the Content Manager Multilanguage* This option is to specify the content related to the content model is having multi language support or not. By default it will be yes. If set as no the data can be entered only in the default language. While entering the data the language tabs will not be available. Single content* This specifies the content model has single content or not. By default it is no. If set to yes, it will be possible to add/edit only one record for that content. By clicking on the menu entry in content manager part, the page shown will be add/edit of the single record in the table related. To make a content model as single content - content model, there should be only one record inside the related table.
Once filled all fields inside the upper part of the page, at least one Attribute must be added to the Content Model in order to be able to save it. To add an Attribute the following part should be completed.
The user can write directly inside the layout shown in the picture above. All needed information is resumed in the table below.
Field ( * denotes mandatory field) Description Sort Order* Position at which the particular Attribute should appear when the Content Model is presented for inputting content data inside the Content Manager Attribute Name* A unique name to identify the Attribute Display Label* Label text to be shown for the Attribute when presented for inputting content data Type* Data type of the Attribute. Possible options: text, description, integer, decimal, date, time, image, video, flash, unlimited, document, lookup Ref. Content Related Content Model (available only if the Attribute type is “lookup”) Ref. Content Attr. Related Content Model attribute (available only if the Attribute type is “lookup”) Comments Comments Mandatory Checkbox(*) This helps to make an attribute mandatory or not. if enabled, will make the attribute as a mandatory field while managing the content.
Click on the button to add new Attributes to the Content Model. At the end save the model. Once a Content Model is saved and active it is shown inside the Content Manager section.
Example: Steps to create a Content Model to add a “News” segment
Consider a “News” segment in a webpage that is expected to carry dynamic content as the one shown in the picture below.
This segment has the following four Attributes:
- Small description
- Big description
In order to create a Content Model for this segment the respective attributes should be added by doing the following operations:
- Complete all fields as shown in the picture and add the 4 attributes needed. Then save.
To edit an already existent Content Model:
- Go to the Content Model list by selecting label
- Go to the Content Model detail by clicking on the Content Model row in the list.
- Make necessary editing and save.
Note: Content Model detail has a collapsible panel on the right side that displays other objects in Z-CMS that have a relation with the particular Content Model. Inside that panel there are three areas that show the following related items:
- Resources: shows a list of webpages in which the particular Content Model is included;
- Widgets: shows a list of widgets in which the particular Content Model is embedded;
- Content Models: shows a list of other Content Models with which the particular Content Model has a relation established through their Attributes.
Import a Content Model inside a site
Content Models in Z-CMS can be imported from a Site to another.
Such downloaded Content Model can be imported into other Sites in the same or different Company, into the Global part of the same or different Company and also into another Z-CMS installation, by using the button provided at the top of the Content Model list page. The import can be done with or without data stored in the Content Model as shown by the following picture.
Copy a Content Model inside a site
Content Models in Z-CMS can be copied from a Site to another.
In order to do that, a Content Model can be copied from the Content Model list by selecting the button highlighted in the picture below:
The following pop-up window appears allowing the selection of where to copy the Content Model (options are the Global part of the same Company, another website or the same Site). Content Models can also be copied with or without contents stored inside.
For Content Models copied to the Global part, is them possible to copy them to other sites by using the same button in the list shown before and by selecting the Site's name inside the following pop-up window that appears.