Artisteer Templates

Introduction

In this tutorial, you will learn how to adapt templates created with Artisteer (http://www.artisteer.com/) to be used in C1 CMS. Artisteer allows you to quickly create website templates with no or little knowledge of Web design, Web scripting etc.

As C1 CMS websites heavily use templates, it makes sense to have a way of adapting the templates created with Artisteer to become usable in C1 CMS.

Many of the templates created with Artisteer are freely available on the Web. You can download them and, by following the steps below, quickly build good-looking and well-formatted C1 CMS templates to use on your website.

Step 1: Get an Artisteer template

You have two options here:

  • Downloading a free template from a website like http://www.quickersite.com/free-templates-to-use-with-quickersite
  • Purchasing the Artisteer program and making your own templates in a very quick way. Here we recommend using the “Website Template” option when exporting the template. It will generate a nicely-formatted HTML page and a number of CSS, JS and image (PNG, JPG, GIF) files.

Step 2: Make preparations on your website

From the Layout perspective:

  1. Create a folder under the “~/Frontend” naming it, for example, “Themes”. This is where you will keep all the template files.
  2. In the “Themes” folder, create a folder naming it after the template you want to adapt (e.g. “MountainsBlue”).
  3. In this template folder, create another folder and name it “images”.
  4. Under “Page Templates”, create a XML-based page layout template. (You will edit this template in Steps 4-5. Keep it as it is for now.)

Step 3: Upload the template files

  1. If the Artisteer template is zipped, unpack it in some folder on your hard drive.
  2. When exported as a “Website Template”, the Artisteer template has the following structure:
    • style.css, style.ie7.css, style.responsive.css
    • script.js, script.responsive.js, jquery.js
    • index.html (and maybe other HTML files)
    • images/*.* (This “images” folder contains a number of image files: *.jpg, *.png, *.gif)
  3. In the Layout perspective, upload all the CSS and JS files to the folder named after the template (e.g. ~/Frontend/Themes/MountainsBlue/).
  4. Then upload all the images from the local “images” folder to the “images” folder in C1 CMS (e.g. ~/Frontend/Themes/MountainsBlue/images/)

Step 4: Copy the template’s content

Now use the contents of the index.html in your template with some changes.

  1. Copy the <script> and <link> elements from <head> in index.html to <head> in your template.
  2. Change the paths in these elements to point to actual paths to the JS and CSS files on your website, changing single <link> elements to <link/> format. E.g.:   

    <script type="text/javascript" src="~/Frontend/Themes/MountainsBlue/script.js"></script>

    <link rel="stylesheet" href="~/Frontend/Themes/MountainsBlue/style.css" type="text/css" media="screen" />

  3. In your template, remove the default set of elements within the <body> element.
  4. Copy the contents of the <body> element from index.html file to <body> element in your template, correcting the elements and entities from HTML format to XML format (<img/>, <br/>, &#160; etc)
  5. If the template’s copied content has images, change their paths to actual paths where applicable in your C1 CMS website by appending “~/Frontend/Themes/MountainBlues” (in this example) to the beginning of the path. For example, <imgsrc=”images/some-image.png”> must be changed to <imgsrc=”~/Frontend/Themes/MountainBlues/images/some-image.png”>
  6. Save the template.

Step 5: Adapt the template’s content

At this point, any page created from this template will simply show the content of index.html. We need to adapt the content so that editors could work with pages based on this template.

  1. Keep the parts that all pages based on this template must share (e.g. a logo image, a header, or a footer).
  2. Replace the parts that change from page to page with content placeholder elements:

    <rendering:placeholder id="contentplaceholder" title="Content" default="true" />
    • Use a unique name for the id of each placeholder you use.
    • We recommend using different titles for you placeholders, too
    • Only one placeholder can be default (default=”true”); others must be set to default=”false”

      Note: At least one content placeholder must be added in the template.
  3. Create, if necessary, and use CMS functions where the content must be shared by pages but can be different based on a specific page it appears on (e.g. navigation menus, banners, “spots”).
  4. Save the template.

Important Notes

  1. If the template uses an HTML form, consider using C1 CMS add-ons that provide the same or similar functionality. You might need to use some forms within <asp:form> element.
  2. Replace the encoded characters the literal type (&nbsp; &copy;) with their numerical equivalents (&#160; &#169;) to avoid validation errors in the template.
  3. The templates created with Artisteer have a set of standard classes used on elements and thus set the hierarchy of the content elements within a template. You may need to identify main elements such as the header, the main part, the footer to correctly choose where to use content placeholders and functions.