Use the {{ list_articles }} statement to get the articles you want. You can
specify the order of the articles. E.g.:
{{ list_articles order="byPublishDate desc" }}
If you want to display only a certain article from the list you can use the
following code:
{{ list_articles length="5" order="byPublishDate desc" }}
{{ if $campsite->current_list->index == 5 }}
{{ /if }}
{{ /list_articles }}
You can use the same construction for each of the 5 articles you want to
display, each with it's own custom display format.
> Author: Terix
> Link: http://code.campware.org/phorum/read.php?8,7962,7962#msg-7962
>
> --------------------------------------------------------------------------------
>
> hi to everybody,
>
> my press staff made me a request that made me think about it. In short, on
> my website i have 5 slots ft articles, one big and 4 small. The big block is
> the 1° most recent article, the to the four goes the 2°, 3°, 4°, 5° article.
> the order is automatic and based on publication date. My staff then asked to
> decide the order of those 5 articles, keeping the feature that when a new
> article is added there is an automatic shift. For example, if an article is
> added on 3° position, automatically the old 3° goes as 4°, the old 4° goes
> to 5°, and the old 5° goes out from the top five.
> I've given an option to set up them as 5 indipendent block using custom
> switches, so they can decide where to put articles, but with this solution i
> don't know how to make the downscale of position, and they don't like to
> change switches all the times there is a new article.
> Can you give me any useful tips to help me finding a way to do what they
> ask?
>
> In short:
>
> - I have 5 boxes for articles called "big", "small1", "small2", "small3",
> "small4";
> - I need to choose the position of any article on the 5 boxes;
> - When a new article is added, in any position, there is a shift of the
> ones on lower position;
>
> --
> Sent from Campware Forums
> http://code.campware.org/phorum
>