Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Inserting Child Pages at the top of Site Tree

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1328 Views
  • Josh
    Avatar
    SilverStripe Developer
    65 Posts

    Inserting Child Pages at the top of Site Tree Link to this post

    I have followed the "ArticleHolder/ArticlePage" tutorial and I am trying to figure out how to make a new article page appear at the top of the ArticleHolder children in the Site Tree instead of at the bottom (to have articles show in order of date published).

    Is there away to do this or should I create a function using the DataObject::get method to list them on the page?

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: Inserting Child Pages at the top of Site Tree Link to this post

    2 things - you can reorganise the order of the pages by clicking the the create button at the top of the site tree and ticking the reorganize box then drag and drop the page to where you want it.

    Or like you said you could also use a method to return them. so you would have something like DataObject::get('ArticlePage','','Date DESC'); you can see this sort of method in the tutorial 2

    1328 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.