Docs: Search, comments and previews
Search, comments and previews
Site search, comments and drafts: searchResults, comments and isPreview.
Search and comments #
searchResults() and askBox() #
The search page's state (the snippet is M, the rest P), and the block that prints the AI answer.
<?php $s = $this->searchResults(); $this->askBox(); ?>
comments($kind, $id) and commentsBlock($kind, $id) #
A thread for a page or post (names P, body M), or null; and the component that prints it with its form.
<?php $this->commentsBlock('page', $page['page_id']); ?>
Previews #
isPreview() and previewed($kind) #
Whether an authorised draft preview is being rendered, and the draft row it shows in place of the stored one (or null).
<?php if ($this->isPreview()): ?><p>Draft preview</p><?php endif; ?>