Campsite 2.3 User Guide

Campsite 2.3 User Guide

Select your language:  
    Search:   
<5.2.4. Building a Section Template        5.2.4.2. Displaying only the most recent feature article on a section page>

Print / Download:
Available languages: english Last update: 2005-08-04 13:09:40

5.2.4.1. The 'Feature' article of the section

Most likely, one or more articles are the main (feature) articles in each section. (Editors mark those articles as such by ticking the Show on section page box in Edit Article Details view; for more details see section 2.2.6) What we will do now, is build a listing for the section template, which will display the feature articles (marked with 'show on section page') first and then list the remaining articles.

<!** list article onsection is on order bynumber desc>

This will make sure that the only articles that will be used which have this feature switched on. They are also ordered by descending numbers, with the newest appearing on the top. This is followed by the variables you want to have listed and the HTML formatting used. In our example it may look like this:

<a href="<!** URI article>"><!** print article name></a>

We can then add more information from the database with the 'print article' command. HTML code goes in-between.

<!** end list>

Then we need to end the listing with the 'end list' command. So here we will list all the ones which are marked. But what if the editors checked more than one article, but your design only works with ONE article on the top, not all of them?


add a note add a note User Contributed Notes
5.2.4.1. The 'Feature' article of the section
There are no user contributed notes for this page.

<5.2.4. Building a Section Template 5.2.4.2. Displaying only the most recent feature article on a section page>

  Last update: 2005-08-04 13:09:40
Website powered by Docmint Last update: 2005-08-04 13:09:40
Total page time: 0.836999177933