Hello all.
I want to show the headlines from an rss on my modx site.
I want to do it in a really smart way, so that other people could change the layout of the headlines in the future (like change it from a <ul> list, to a div with a href or anyother layout), without the need to see and edit the php section.
From what I understand, the only way to do this, is by using placeholders, but as rss feeds snippet works, is by doing a foreach loop that outputs the headlines. This is a problem for placeholders, because I can’t use placeholders with arrays.
So... I got a suggestion from the modx irc channel, to use a chunk for the outer html (like <ul>) and to use another chunk for each item (like <li> for each headline).
What do you say about this? How do you suggest I should do this, and how can this suggestion can be implemented ?
Thanx
-
☆ A M B ☆
- 24,524 Posts
Sounds like a variation on the Wayfinder snippet. Study the code for that; it lets you use chunk templates for just about everything.