Content Models

From GruppoZenit
Jump to: navigation, search

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.


Each Content Model with all its Attributes is connected by a Widget to the front-end part of the webpage to enable the visualization in public of contents added inside the CMS.


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.


Contents

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 Resources n 2.PNG label from the menu on the left of the page and then click the button Themes 3.png 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.

Content attributes.png

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 Content Model 3.png 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.

Content Model 4.png

This segment has the following four Attributes:

  • Title
  • Small description
  • Image
  • Big description


In order to create a Content Model for this segment the respective attributes should be added by doing the following operations:

  • Click from the Site dashboard page Resources n 2.PNG --> Themes 3.png and the following page opens:
Content Model 5.png
  • Complete all fields as shown in the picture and add the 4 attributes needed. Then save.

After saving, the “News_CM” Content Model will be available inside the developer's Content Manager menu for editing content data for the above-defined four Attributes:

Content Model 6.png


To edit an already existent Content Model:

  • Go to the Content Model list by selecting label Resources n 2.PNG
  • 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.


In order to do that, a Content Model can be downloaded as a .zip file from the Content Model list page (both in the Global part or inside a website), as shown in the following screenshots.

Content Models n 1.jpg Content Models n 2.jpg

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 Themes 4.png 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.

Content Models n 3.jpg


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:

Content Models n 4.jpg

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.

Content Models n 5.jpg

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.

Content Models n 6.jpg


See also

Personal tools
Namespaces

Variants
Actions
Toolbox