makari Posted June 20, 2015 Share Posted June 20, 2015 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 More sharing options...
LostKobrakai Posted June 20, 2015 Share Posted June 20, 2015 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". 1 Link to comment Share on other sites More sharing options...
makari Posted June 20, 2015 Author Share Posted June 20, 2015 thank you! problem is solved. Link to comment Share on other sites More sharing options...
makari Posted June 20, 2015 Author Share Posted June 20, 2015 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 More sharing options...
JeevanisM Posted May 29, 2020 Share Posted May 29, 2020 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now