Jump to content

sort=-date – without any effect


makari
 Share

Recommended Posts

Hallo,

to show some featured objects on the front page, I use a field 'featured'.

To show the newest first, I do this:

foreach($pages->find("featured=1, sort=-date") as $Objekt) {
	... ; 
}

Tested it with sort=date | sort=-date, but there is no effekt to the output.

What's wrong?

Thank you

Link to comment
Share on other sites

long version:

Now I use a Field named 'featured' with type 'Page' on the frontpage template - so the custumer can combine a set of featured objects on one place...

foreach($page->featured->sort("-created") as $Objekt) {
	... ; 
}
Link to comment
Share on other sites

  • 4 years later...
On 6/20/2015 at 7:05 PM, LostKobrakai said:

Is there a field datefield named "date" in that page? If not you either need to create it or use one of these, depending on your usecase: "created" or "modified".

thanks, got useful now.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...