public function __toString() { if ($this->page instanceof Page) { return $this->page->layout; } return ''; }