$site
The $site
object is the root element for any site with pages. It represents the main content folder with its site.txt
.
-
new Site()
-
$site->apiUrl()
-
$site->audio()
-
$site->blueprint()
-
$site->blueprints()
-
$site->breadcrumb()
-
$site->callMethod()
-
$site->changeTitle()
-
$site->children()
-
$site->childrenAndDrafts()
-
$site->clone()
-
$site->code()
-
$site->content()
-
$site->contentFile()
-
$site->contentFileData()
-
$site->contentFileDirectory()
-
$site->contentFileExtension()
-
$site->contentFileName()
-
$site->contentFiles()
-
$site->createChild()
-
$site->createFile()
-
$site->decrement()
-
$site->documents()
-
$site->draft()
-
$site->drafts()
-
$site->errorPage()
-
$site->errorPageId()
-
$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->hasMethod()
-
$site->hasUnlistedChildren()
-
$site->hasVideos()
-
$site->homePage()
-
$site->homePageId()
-
$site->id()
-
$site->image()
-
$site->images()
-
$site->increment()
-
$site->index()
-
$site->inventory()
-
$site->is()
-
$site->isLocked()
-
$site->isValid()
-
$site->kirby()
-
$site->lock()
-
$site->mediaRoot()
-
$site->mediaUrl()
-
$site->modified()
-
$site->page()
-
$site->pages()
-
$site->panel()
-
$site->panelPath()
-
$site->panelUrl()
-
$site->permissions()
-
$site->previewUrl()
-
$site->purge()
-
$site->query()
-
$site->readContent()
-
$site->root()
-
$site->save()
-
$site->search()
-
$site->setPage()
-
$site->setSite()
-
$site->site()
-
$site->toArray()
-
$site->toSafeString()
-
$site->toString()
-
$site->translation()
-
$site->translations()
-
$site->update()
-
$site->url()
-
$site->urlForLanguage()
-
$site->videos()
-
$site->visit()
-
$site->wasModifiedAfter()
-
$site->writeContent()
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: