2022-08-21 00:40:49 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-08-23 13:09:12 +02:00
<class name= "StaticWebPage" inherits= "WebNode" version= "3.8" >
2022-08-21 00:40:49 +02:00
<brief_description >
2022-08-21 22:02:26 +02:00
Sends what's in it's [code]data[/code] property when it handles a [WebServerRequest], and what's in it's [code]preview_data[/code] property when [code]render_preview()[/code] is called.
2022-08-21 00:40:49 +02:00
</brief_description>
<description >
2022-08-21 22:02:26 +02:00
The StaticPage WebNode just renders what's set into it's [code]data[/code] property.
If it's [code]should_render_menu[/code] property is set to true (default) then it will also call [code]render_menu()[/code].
Also supports loading data from files through the [code]load_file()[/code] helper method, and can also render markdown files to HTML.
2022-08-21 00:40:49 +02:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "load_and_process_file" >
<return type= "void" />
<argument index= "0" name= "path" type= "String" />
<description >
2022-08-21 22:02:26 +02:00
Loads a file, and processes it if it can. (if it's a markdown file, it will get rendered as html.)
2022-08-21 00:40:49 +02:00
</description>
</method>
<method name= "load_file" >
<return type= "void" />
<argument index= "0" name= "path" type= "String" />
<description >
2022-08-21 22:02:26 +02:00
Sets the contentds of the given file to the [code]data[/code] property
2022-08-21 00:40:49 +02:00
</description>
</method>
<method name= "load_md_file" >
<return type= "void" />
<argument index= "0" name= "path" type= "String" />
<description >
2022-08-21 22:02:26 +02:00
Loads and processes a markdown file.
2022-08-21 00:40:49 +02:00
</description>
</method>
<method name= "set_data_md" >
<return type= "void" />
<argument index= "0" name= "path" type= "String" />
<description >
2022-08-21 22:02:26 +02:00
Process the given [String] as a markdown, and set it to the [code]data[/code] property.
2022-08-21 00:40:49 +02:00
</description>
</method>
</methods>
<members >
<member name= "data" type= "String" setter= "set_data" getter= "get_data" default= """" >
2022-08-21 22:02:26 +02:00
The data that will be sent back to a request.
2022-08-21 00:40:49 +02:00
</member>
<member name= "preview_data" type= "String" setter= "set_preview_data" getter= "get_preview_data" default= """" >
2022-08-21 22:02:26 +02:00
The preview that can be used by other WebNodes if you set it.
2022-08-21 00:40:49 +02:00
</member>
<member name= "should_render_menu" type= "bool" setter= "set_should_render_menu" getter= "get_should_render_menu" default= "true" >
2022-08-21 22:02:26 +02:00
Whether to call [code]render_menu()[/code] when it handles a request.
2022-08-21 00:40:49 +02:00
</member>
</members>
<constants >
</constants>
</class>