Monday 10 October 2005 5:56:45 pm
Hi Matt, Basically if you do a fetch, you will end up with an array of objects (in your case of articles). You can then specify which article in the array to display (and where) with in the template you can create. In my example, I loop through the articles as Im displaying them in the same way, just one after another, you can put them in some sort of table or whatever you want. breaking down the code a little
{set news=fetch( content, list, hash( parent_node_id, $news_node,
sort_by, array( priority, false() ),
offset, $offset,
limit, $limit )
)
}
this just fetches the articles I want, if I want the 2nd 3rd and 4th articles (note I use priority), I could set the offset to 1 and the limit to 3. If I ant the 1st and 2nd articles offset=0 limit=2. the loop part of the code, is grabbing each item in the array, and applying a stylesheet to and displaying the attributes ie title, intro etc. the chess club tutorial on this website should go through things like this. cheers Arran
|