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.

Archive /

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

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

Inserting Child Pages at the top of Site Tree


Go to End


2 Posts   1754 Views

Avatar
Josh

SilverStripe Developer, 65 Posts

8 March 2008 at 9:42pm

Edited: 08/03/2008 9:42pm

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?

Avatar
Willr

Forum Moderator, 5523 Posts

8 March 2008 at 10:10pm

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