Campsite 2.3 User Guide

Campsite 2.3 User Guide

Select your language:  
    Search:   
<5.2.4.3. Including Images in the Section Listing        5.2.6. Powerful Lists and Ordering>

Print / Download:
Available languages: english Last update: 2005-10-12 08:07:21

5.2.5. Building a Home Page Template

The main function of the home page is to provide quick access to the publication sections and display short descriptions of the most important articles. As with the section page we'll divide the home page into four zones: header, left menu, content and footer, like in the pictures below:

1. Home page top


2. Home page footer
First we include the header template, which is common to all publication pages:
    <!** include header.tpl>

In the header we may:
- print the publication name:
    <!** print publication name>
- print the issue name, number and publication date:
    <!** print issue name>, <!** print issue number>, <!** print issue date>
- check if the current issue was the last published issue:
    <!** if issue iscurrent>

Next, we build the left menu:
    <!** include navigationtemplate.tpl>
(see 5.2.2 Generating a navigation template)

Now we can build the home page content by printing a short descriptioin of articles selected to be highlighted on this page:
    <!** list article onfrontpage is on>
        <p><a href="<!** uri article>"><!** print article name></a></p>
        <br>on <!** print article date>, by <!** print article author>
        <br><!** print article intro>
    <!** endlist>

The first line will create a list of articles that have "Show article on front page" option checked. Then we create a link to the full article content (line 2), display the article date and author (line 3) and finally the short description (line 3).

The last thing to do is include the footer:
    <!** include footer.tpl>

Template footer.tpl is not explained here. For more details on the front page code download the demo templates from Campsite download page.


add a note add a note User Contributed Notes
5.2.5. Building a Home Page Template
There are no user contributed notes for this page.

<5.2.4.3. Including Images in the Section Listing 5.2.6. Powerful Lists and Ordering>

  Last update: 2005-10-12 08:07:21
Website powered by Docmint Last update: 2005-10-12 08:07:21
Total page time: 0.67955493927