Campsite 2.3 User Guide

Campsite 2.3 User Guide

Select your language:  
    Search:   
<5.2.2. Building a Navigation Template        5.2.4. Building a Section Template>

Print / Download:
Available languages: english Last update: 2005-10-12 08:06:58

5.2.3. Building an Article Template

Building an article template is the easiest option. All you need to do is generate your HTML layout and substitute the dynamic sections (title, author, intro, text...) with the simple tag:

<!** print article title>

The command is 'print article'; the 'title' part varies. This is the name of the variable that you assigned when building the Article Types. So it could also read:

<!** print article sportsitemdeck>

As the rest of the HTML layout remains as it is, a simple template might look like this:


<body>
<h1><!** print article title></h1>
<h3><!** print article subtitle></h3>
<i>Written by <!** print article authorname> on the <!**print article date></i><p>
<!** print article text>
</body>
</html>

The reason we can reduce the templates to such a simple solution is, because Campsite will remember where it comes from and where it is. So by the time the user arrives at one particular article, Campsite knows the publication, the issue, the section, and even the article ID and can simply generate the HTML page from the database by using the environmental variables together with the layout information in the template.

Obviously, your design can be far more advanced than this page. And Campsite can also perform far more advanced functions than this. In order to get a feel for this, let's jump into the next example, building the navigation. (A full list of tag commands can be found at the end of this chapter.)


add a note add a note User Contributed Notes
5.2.3. Building an Article Template
There are no user contributed notes for this page.

<5.2.2. Building a Navigation Template 5.2.4. Building a Section Template>

  Last update: 2005-10-12 08:06:58
Website powered by Docmint Last update: 2005-10-12 08:06:58
Total page time: 1.9073009491