$site
The $site
object is the root element for any site with pages. It represents the main content folder with its site.txt
.
- $site->audio()
- $site->blueprint()
- $site->blueprints()
- $site->breadcrumb()
- $site->changeTitle()
- $site->children()
- $site->childrenAndDrafts()
- $site->clone()
- $site->code()
- $site->content()
- $site->createChild()
- $site->createFile()
- $site->decrement()
- $site->documents()
- $site->draft()
- $site->drafts()
- $site->errorPage()
- $site->errors()
- $site->exists()
- $site->file()
- $site->files()
- $site->find()
- $site->findPageOrDraft()
- $site->grandChildren()
- $site->hardcopy()
- $site->hasAudio()
- $site->hasChildren()
- $site->hasCode()
- $site->hasDocuments()
- $site->hasDrafts()
- $site->hasFiles()
- $site->hasImages()
- $site->hasListedChildren()
- $site->hasUnlistedChildren()
- $site->hasVideos()
- $site->homePage()
- $site->id()
- $site->image()
- $site->images()
- $site->increment()
- $site->index()
- $site->is()
- $site->isLocked()
- $site->isValid()
- $site->kirby()
- $site->lock()
- $site->modified()
- $site->page()
- $site->pages()
- $site->panel()
- $site->permissions()
- $site->purge()
- $site->root()
- $site->search()
- $site->site()
- $site->toArray()
- $site->toSafeString()
- $site->toString()
- $site->translation()
- $site->translations()
- $site->update()
- $site->url()
- $site->uuid()
- $site->videos()
- $site->wasModifiedAfter()
- new Site()
How to access the $site
object
The $site
variable is automatically available in your templates and snippets.
To access the $site
object in extensions, you have to define it first: