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
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
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
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
Hi
Thanks for your help it is working now.
Thanks
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.