Jump to:

23368 Posts in 18143 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » Select Multiple pages to show on front page

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

Page: 1
Go to End
Author Topic: 1274 Views
  • bunheng
    Avatar
    Community Member
    77 Posts

    Select Multiple pages to show on front page Link to this post

    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

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: Select Multiple pages to show on front page Link to this post

    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

  • bunheng
    Avatar
    Community Member
    77 Posts

    Re: Select Multiple pages to show on front page Link to this post

    Hi

    Thanks for your help it is working now.

    Thanks

  • quanto
    Avatar
    Community Member
    81 Posts

    Re: Select Multiple pages to show on front page Link to this post

    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.

    1274 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.