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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   2586 Views

Avatar
doubleedesign

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?

Avatar
Howard

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