Campsite 2.3 User Guide

Campsite 2.3 User Guide

Select your language:  
    Search:   
<4.5. Topics        5.1. Template Quickstart Guide: "How do I...">

Print / Download:
Available languages: english Last update: 2005-08-25 11:39:03

5. CREATING TEMPLATES FOR YOUR PUBLICATION

Table of Contents
5.1. Template Quickstart Guide: "How do I..."
5.2. Templates In-depth
5.3. Template Language Reference

When implementing Campsite, chances are you will already have a rather clear outline of the structure of your publication online, or - even better - have a running web version already in HTML. Either way, to migrate your publication to Campsite you will have to generate customized templates for your content. Such templates will be incorporating the Campsite tags used to pull information from the database into the HTML page.

The following sections will guide you step by step through the process of generating such templates. Before proceeding, you should layout your site design.  This can be done in many ways, including sketching your design on paper, or using an HTML editor.  However, the design of web pages is outside the scope of this document. 

One of the main goals of Campsite is to offer a fully customizable layout for online publications and at the same time keep the content independent of the layout. This is done by means of templates. Those templates are nothing more than HTML files containing embedded Campsite description-language tags, which creates the link between the view and the content.

Templates are in-between your content database and your audience on the web. Therefore they need to mediate between both. The database needs to understand what information is requested, and the user's browser needs to retrieve a finished HTML page.

The template sets the stage, passing specific environmental information to the database query, such as: "list only articles from current issue and section 'sports'." At the same time, it gives detailed instructions on how content should be displayed in HTML format. This distinction between environment and content is crucial for understanding and building templates. The template language was designed to be usable on different levels of dynamic features: one can make static templates for every issue, section, article or just a few customized templates that generate different views depending on the given parameters.

The following will cover some examples on how to build templates. Further down you can find a complete list of available commands used by Campsite templates.



add a note add a note User Contributed Notes
5. CREATING TEMPLATES FOR YOUR PUBLICATION
There are no user contributed notes for this page.

<4.5. Topics 5.1. Template Quickstart Guide: "How do I...">

  Last update: 2005-08-25 11:39:03
Website powered by Docmint Last update: 2005-08-25 11:39:03
Total page time: 0.68342590332