Help
You can create local site resources in doc/Site.md and either link to doc/Home.md for the standard resources or use our include mechanism to include it on your local page.
- Full name:
\Zotlabs\Module\Help
- Parent class:
\Zotlabs\Web\Controller
Properties
heading_slug
Methods
init
Pre-check before processing request.
Determine language requested, and ensure that a topic was requested. If no topic was requested, redirect to the about page, and abort processing.
get
Process get request for the help module.
Loads the correct help file from the doc/
directory, and passes it to
the help template in view/tpl/help.tpl
.
If the requested help topic does not exist for the currently selected language, a 404 status is returned instead.
This function currently also handles search and serving static assets that may be used by the help files.
Return Value:
The rendered help page or a 404 page if help topic was not found.
render_content
render_help_file
Parameters:
Parameter | Type | Description |
---|---|---|
$file_name |
string | |
$file_type |
string |
get_page_title
get_toc_heading
get_heading
set_page_title
Set the page title to an unslugified version of the file name.
Inherited methods
init
Initialize request processing.
This method is called before any other request processing, and regardless of the request method. The theme is not yet loaded when this method is invoked.
post
Process POST requests.
This method is called if the incoming request is a POST request. It is invoked after the theme has been loaded. This method should not normally render HTML output, as processing will fall through to the GET processing if this method completes without error or stopping processing in other ways.
get
Process GET requests or the body part of POST requests.
This method is called directly for GET requests, and immediately after the
post()
method for POST requests.
It will return the module content as a HTML string.
Return Value:
HTML content for the module.
determine_help_language
Determines help language.
If the language was specified in the URL, override the language preference of the browser. Default to English if both of these are absent.
Updates the $lang
property of the module.
find_help_file
Find the full path name of the file, given it's base path and the language of the request.
Parameters:
Parameter | Type | Description |
---|---|---|
$base_path |
string | The path of the file to find, relative to the doc root path, and without the extension. |
$lang |
string |
missing_translation
missing_translation_message
Automatically generated on 2025-03-19