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, biapar, Willr, Ingo, swaiba, simon_w

Select Multiple pages to show on front page


Reply

4 Posts   1300 Views

Avatar
bunheng

4 February 2011 at 9:02pm Community Member, 78 Posts

Hi,

I would like to display four pages on home page, those pages must have value in field IsFrontPage=true is there any quick way?

Thank for your help
Bunheng

Avatar
Nivanka

5 February 2011 at 3:11am Community Member, 395 Posts

use a new page type, and have a new boolean field called IsFrontPage

then you can add a new checkbox field by extending the getCMSFields method. that will help, and on the home page you can use a DataObject::get('Page', 'IsFrontPage=1'); to grab all the pages

Avatar
bunheng

5 February 2011 at 6:42am Community Member, 78 Posts

Hi

Thanks for your help it is working now.

Thanks

Avatar
quanto

8 August 2011 at 9:21pm (Last edited: 9 August 2011 7:38pm), Community Member, 81 Posts

Hi Nivanka,

I get the point. However I'm trying to get the layout from the different pages, but thes aren't showing up. What are the possibilities for this? Check also [url=http://www.silverstripe.org/template-questions/show/17747]this[/url] post.