Resources

From GruppoZenit
Jump to: navigation, search

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.


Resources can be of many different kinds. There could be Resources written in XHTML, CSS, Javascript. More over different file formats can be read by Z-CMS in this context to allow the addiction of Resources like images, video, audio, fonts and styles.


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.


Contents

Resources buttons

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 Resources 1.png or edit existing ones by selecting the relative row in the table.


Resources 2.png 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.


Resources 3.png 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.


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

Resources 5.png defines when a Resource is published.

Resources 6.png defines when it is possible to see the preview of a Resource.

Resources 7.png 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.

Resources 8.png deletes the record.

Resources 9.png allow the download of the Resource inside a .zip file that can be used outside Z-CMS.


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 Site settings n 1.PNG --> Resources n 1.PNG --> Resources 1.png.
  • The following page opens that requires the information reported inside the table below:
Resources 12.png
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:
<title>home title</title>
- 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:
Resources 13.png
  • 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:

Resources 14.png
Resources 15.png
Resources 16.png
  • Now it is possible to create a web feed from site dashboard Site settings n 1.PNG --> Resources n 1.PNG --> Resources 1.png.
  • A new detail page opens as shown in the picture, and user should fill the information shown in the table below:
Resources 17.png
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:
Resources 18.png
  • Now for a quick preview of the web feed just created, click button Resources 20.png:
Resources 19.png
  • Click Save


Note: web feeds can be reached using respective URLs obtained after Site deployment.


See also

Personal tools
Namespaces

Variants
Actions
Toolbox