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

Avatar
bunheng

Community Member, 78 Posts

4 February 2011 at 9:02pm

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

Community Member, 398 Posts

5 February 2011 at 3:11am

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

Community Member, 78 Posts

5 February 2011 at 6:42am

Hi

Thanks for your help it is working now.

Thanks

Avatar
quanto

Community Member, 81 Posts

8 August 2011 at 9:21pm

Edited: 09/08/2011 7:38pm

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.