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

Select Multiple pages to show on front page


Go to End


4 Posts   1665 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, 400 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, 91 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 this post.