Is there a way to access $site from a page model?

I was trying to access a method of $site inside a page model - to be exact: the method description(), that should return the content of the ‘Description’ key inside of content/site.txt.

Unfortunately $site doesn’t seem to be available inside a page model:

Undefined variable: site

Does anybody know if there is a way to access $site from inside a page model?

Try kirby()->site()->description()

1 Like

Thanks. It works - and was easy :wink: