2022-08-21 00:40:49 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-06-13 17:34:41 +02:00
<class name= "ListWebPage" inherits= "WebNode" version= "3.12" >
2022-08-21 00:40:49 +02:00
<brief_description >
2022-08-21 22:23:59 +02:00
The ListPage WebNode can be pointed to a folder using it's folder variable, and then it will load all files in that folder, process them as markdown in alphabetical order, and put them onto a page, one after the other. It also supports pagination.
2022-08-21 00:40:49 +02:00
</brief_description>
<description >
2022-08-21 22:23:59 +02:00
The ListPage WebNode can be pointed to a folder using it's folder variable, and then it will load all files in that folder, process them as markdown in alphabetical order, and put them onto a page, one after the other. It also supports pagination.
This class will load and generate pages from a folder of md files. It supports pagination, it will put entry_per_page md files per page. It generates html on enter tree, and caches everything. Each md file gets rendered into a div with a class of "list_entry"
HTML (If there are entries):
[code]render_menu()
< div class="main_div_class(list_page)">
< div class="entry_div_class(list_entry)"> md file 1< /div>
< div class="entry_div_class(list_entry)"> md file 2< /div>
...
... pagination ...
< /div> [/code]
HTML (If there are no entries):
[code]render_menu()
< div class="main_div_class(list_page)">
< div class="empty_div_class(list_entry_empty)"> placeholder_text(No content yet!)< /div>
< /div> [/code]
2022-08-21 00:40:49 +02:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "load" >
<return type= "void" />
<description >
2022-08-21 22:23:59 +02:00
Maunally load everything.
2022-08-21 00:40:49 +02:00
</description>
</method>
</methods>
<members >
<member name= "empty_div_class" type= "String" setter= "set_empty_div_class" getter= "get_empty_div_class" default= ""list_entry_empty"" >
2022-08-21 22:23:59 +02:00
This is going to be the class of the div of the placeholder_text if it's rendered.
2022-08-21 00:40:49 +02:00
</member>
<member name= "entry_div_class" type= "String" setter= "set_entry_div_class" getter= "get_entry_div_class" default= ""list_entry"" >
2022-08-21 22:23:59 +02:00
Every file will be in a div with this class.
2022-08-21 00:40:49 +02:00
</member>
<member name= "entry_per_page" type= "int" setter= "set_entry_per_page" getter= "get_entry_per_page" default= "4" >
2022-08-21 22:23:59 +02:00
This many entries will be at max rendered per page.
2022-08-21 00:40:49 +02:00
</member>
<member name= "folder" type= "String" setter= "set_folder" getter= "get_folder" default= """" >
2022-08-21 22:23:59 +02:00
The path of the folder to load files from.
2022-08-21 00:40:49 +02:00
</member>
<member name= "main_div_class" type= "String" setter= "set_main_div_class" getter= "get_main_div_class" default= ""list_page"" >
2022-08-21 22:23:59 +02:00
The main div's class that contains everything.
2022-08-21 00:40:49 +02:00
</member>
<member name= "max_visible_navigation_links" type= "int" setter= "set_max_visible_navigation_links" getter= "get_max_visible_navigation_links" default= "6" >
2022-08-21 22:23:59 +02:00
This many pagination links will be visible max.
2022-08-21 00:40:49 +02:00
</member>
2023-06-13 17:55:03 +02:00
<member name= "paginate" type= "bool" setter= "set_paginate" getter= "get_paginate" default= "false" >
2022-08-21 22:23:59 +02:00
Whether to allow pagination or not.
2022-08-21 00:40:49 +02:00
</member>
<member name= "placeholder_text" type= "String" setter= "set_placeholder_text" getter= "get_placeholder_text" default= ""No content yet!"" >
2022-08-21 22:23:59 +02:00
If there are no files this text will be displayed.
2022-08-21 00:40:49 +02:00
</member>
</members>
<constants >
</constants>
</class>