A Resource in Z-CMS is intended as a building block of a website or webpage such as a webpage template (.xhtml), a web feed (.xfeed), a style, a script, an image, an audio, a video or a document (ex. .pdf file).
Resources of a site shape the way in which its contents are shown in front-end and determine the kind of contents to show as well.
According to the variety of files formats accepted by Z-CMS, there is a set of different detail pages that cope with the type of Resource that is added. However all detail pages require the definition of a unique title for the Resource, allow the insertion of comments and descriptive fields and show an editable preview of the Resource.
Note: for the Sites with a theme selected during their creation/configuration, particular theme associated styles, scripts, images and other files will be available as default at respective Site specific "Resources" location. Further, webpage templates (.xhtml) associated with the selected theme will be available as additional "Theme Layout" options during the creation of new webpages in respective Sites.
The user can perform several operations in the page by using the set of buttons that are placed at the top of the page.
By selecting Resource from the site menu, the user land to a table in which all Resources added to the site are shown. There he can add a new resource through the button or edit existing ones by selecting the relative row in the table.
these two buttons allow the user to add a folder and to import a file inside the Resources of the site. Even if it is possible to create a Resource directly inside Z-CMS, with this feature externally developed Resources can be added to the site as well.
by clicking this button the user can have a preview of the site in Z-CMS as it was published. Z-CMS creates a pop-up window inside the browser to give the user a complete perception of the look and feel of the site.
by clicking this button the user can publish the Resource to production. Z-CMS creates also a pop-up window inside the browser to give the user a complete perception of the look and feel of the newly published site.
Another set of buttons is placed inside the table and allows direct operations over each record.
indicates that it is possible to see the history of the Resource. Z-CMS preserves pre-edited versions of .xhtml files and .xfeed files to enable option for later verification and revert. Before saving edited versions of an .xhtml or an .xfeed file, Z-CMS moves their current version to the history. View history option is available only for resources of type .xhtml and .xfeed.
Example: creation of a webpage Resource
In this example it is explained how to create and edit a webpage inside the Z-CMS Resources section. A valid webpage in Z-CMS must be of strict xhtml type.
In order to create a webpage in Z-CMS the user can perform the following operations:
- From the Site dashboard page, go to --> --> .
- The following page opens that requires the information reported inside the table below:
Field ( * denotes mandatory field) Description Page Name* Name of the .xhtml file. Webpages are stored as .xhtml files in Z-CMS "web page”/“web feed”* Select “web page” option to store the page as .xhtml Page Description META description of the webpage Theme Layout Desired layout of the webpage Page Identifier* A unique identifier for the webpage within the Site. Also used as an identifier in the Site context URL to refer to the particular webpage Page Title Title of the webpage
- Examples referred to the table above:
- - Page Description META name: if supplied as “domestic”, meta tag for the webpage will be generated as follows:
<meta name="description" content="domestic">
- - Page Identifier: if supplied as “home”, Site Context URL to refer to the particular web page will be as follows: "www.sitename.it/en/home". In this site URL, “/en” refers to the identifier used by Z-CMS to present the webpage into a particular language, “English” in this case.
- - Page Title: if supplied as “home title”, title tag for the webpage will be generated as follows:
- - Theme Layout selected in this case is the Z-CMS default one; “Blank”, and hence Z-CMS has loaded the following default Layout Content for the webpage:
<zcms:pagestart /> <head> <zcms:pagehead /> <title> Title goes here </title> </head> <body> <!-- code goes here--> </body> <zcms:pageend />
- Default Layout Content is loaded for the webpage also in case there is no theme selected for the particular Site during its creation/configuration. However, additional Theme layout options based on the webpage templates (.xhtml) associated with the theme (“theme_general” in this example) selected for the Site during its creation/configuration will be available for selection to load corresponding Layout Content for the webpage as follows:
- Click save
Example: creation of a web feed Resource
In Z-CMS is possible to create web feeds of content data, which can be consumed by external feed based applications, feed readers, scripts, etc. Web feeds can be created and stored in any of the following formats: RSS, XML, JSON and TXT.
In order to create a web feed in Z-CMS the user can perform the following operations:
- Now it is possible to create a web feed from site dashboard --> --> .
- A new detail page opens as shown in the picture, and user should fill the information shown in the table below:
Field ( * denotes mandatory field) Description Page Name* Name of the .xfeed file. Web feeds are stored as .xfeed files in Z-CMS "web page”/“web feed”* Select “web feed” option to store the page as .xfeed Page Description Can store a description for the web feed. No specific purpose or significance associated though Page Identifier* A unique identifier for the web feed within the Site. Also used as an identifier in the Site context URL to refer to the particular web feed Page Title Can store a title for the web feed. No specific purpose or significance associated though
- Note: in this sample, “TXT” (text) is used as the feed type and “|” (pipe) as the delimiter. Web feeds in other Z-CMS supported formats can be realized also as illustrated below:
- Click Save
Note: web feeds can be reached using respective URLs obtained after Site deployment.