hey there, just wondering what people’s go-to link module is, particular with the latest version of Elemental?


where the lookup happen however your structure is formed, this can be different depending on setup (as the doc says), so it cannot explicitly tell the reader how to do this - it can be different in different situations.


@aljosab it assumes some knowledge, yes. The text explains >store page reference directly on the block And explains how (when) to set it >when block is created (onBeforeWrite)

The assumption is that the reader knows enough about SilverStripe and creating relationships that this is relatively straight forward.

  1. private static $has_one = [ ... 'OwnerPage' => Page::class, ...]
  1. public function onBeforeWrite() {
  2. if (!$this->OwnerPageID) {
  3. $this->OwnerPageID = ... ;
  4. }
  5. }

The topic is suggesting I can make a perormance improvement but it doesn't tell me how