You can use Ditto to manage adding new articles and then automatically show the latest one at the top and the two most recent at the bottom. However the top article has the image seperated out, but with Ditto I believe that it needs each article as a single HTML block. If you can move the image next to the text, like you have it for the other articles below, then I think that would make things easier. Otherwise you might have to process the output from Ditto using a custom snippet to seperate out the image from the text for the first article only. Should be fairly easy to do. You can use a placeholder for the image.
Andy
-
☆ A M B ☆
- 24,524 Posts
Now I remember hacking the old NewsListing snippet to have the first item display the whole article, and the subsequent ones just the truncated summary. As I recall, it wasn’t all that difficult. Hmm. I haven’t really looked at the Ditto code yet.
and in the second ditto call, use &start=`2` parameter to skip the first item that is shown by the first ditto call..
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Hi,
In my opinion, you don’t need to call twice ditto.
You have to setup the &tplFirstRow parameter to display the first doc with diiferent layout.
:-)
Yes heliotrope, that suits the best for this case! I wasn’t aware of that parameter yet, thanks!
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Thanks again for all the answers.
Now, I’ve got another question regarding the images... how can I automate the image upload / resizing / displaying process?
In the image url I’ve posted just above you can see that for a special article category (here "dans mon assiette") I got the
last article on top with an associated image and at the bottom the older articles with their respective image.
On a journalist side, how can we proceed when someone wants to post a new article and associate image(s) to it ?
How do I handle the image resizing process ? and then... How do I handle the right image display in the article category ?
Thanks a lot for your answers.
LB