Message of the day:
Release 4.5.0 is out. Changelog: https://docs.silverstripe.org/en/4/changelogs/4.5.0
SilverStripe 4 related information and questions.
Last person who edited
Do you want the last person who published a page, or the last person that edited it?
And that One is doing so many queries... so wanted to optimize it a little
Yes but doing
Versioned::get_by_stage() and in loop
$page->Author() doesn't work I need to go in the loop
Isn't that what
Is there a way of doing
SomePage::get()->filter(['SomePropertyThatReflectsPublished' => true])
I’d probably do something like:
SomePage::get() gets you the latest version of all pages,
->byID(2338) gets the specific one you’re looking for from the collection, and then you get the Author’s FirstName