Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Use content from About Us page on a section of Homepage

Go to End

10 Posts   1955 Views


Community Member, 19 Posts

15 October 2010 at 6:56pm

Hi again!

I have a table in which upcoming events are manually entered, and I want this reflected on another page - but only some of it. So if the site administrator lists 25 items, I don't want them all to come up (the visitor has to go to the actual calendar page for that). Kind of like how the News page from the tutorial only shows the first paragraph via $Content.FirstParagraph perhaps - I want to limit it to say, 5 rows. Any ideas about how I could do this?


Community Member, 215 Posts

15 October 2010 at 7:41pm

There is no easy way to do this, you would have to create a function that was smart enough to scan the html and break the table after 5 <tr> tags and then close the table...

I would investigate using dataobjects for the results instead of just entering them into a table.

Go to Top