$html_template
$html_template : string
The root HTML template that all pages are built from.
Renders the HTML page that is sent to the client.
register_part_preprocessor(\function $function)
Registers a function as a part post processor.
This function's use is more complicated to explain. Pepperminty Wiki
renders pages with a very simple templating system. For example, in the
template a page's content is denoted by {content}
. A function
registered here will be passed all the components of a page just
before they are dropped into the template. Note that the function you
pass in here should take a reference to the components, as the return
value of the function passed is discarded.
\function | $function | The part preprocessor to register. |
render(string $title, string $content, boolean $body_template = false) : string
Renders a HTML page with the content specified.
string | $title | The title of the page. |
string | $content | The (HTML) content of the page. |
boolean | $body_template | The HTML content template to use. |
The rendered HTML, ready to send to the client :-)
AddServerPushIndicator(string $type, string $path)
Adds a resource to the list of items to indicate that the web server should send via HTTP/2.0 Server Push.
Note: Only specify static files here, as you might end up with strange (and possibly dangerous) results!
string | $type | The resource type. See https://fetch.spec.whatwg.org/#concept-request-destination for more information. |
string | $path | The relative url path to the resource. |
render_navigation_bar(array $nav_links, array $nav_links_extra, string $class = "")
Renders a navigation bar from an array of links. See $settings->nav_links for format information.
array | $nav_links | The links to add to the navigation bar. |
array | $nav_links_extra | The extra nav links to add to the "More..." menu. |
string | $class | The class(es) to assign to the rendered navigation bar. |