pandemonium_engine/modules/web/doc_classes/ListWebPage.xml

62 lines
3.2 KiB
XML
Raw Normal View History

2022-08-21 00:40:49 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2024-04-26 17:32:25 +02:00
<class name="ListWebPage" inherits="WebNode" version="4.4">
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()
&lt;div class="main_div_class(list_page)"&gt;
&lt;div class="entry_div_class(list_entry)"&gt;md file 1&lt;/div&gt;
&lt;div class="entry_div_class(list_entry)"&gt;md file 2&lt;/div&gt;
...
... pagination ...
&lt;/div&gt;[/code]
HTML (If there are no entries):
[code]render_menu()
&lt;div class="main_div_class(list_page)"&gt;
&lt;div class="empty_div_class(list_entry_empty)"&gt;placeholder_text(No content yet!)&lt;/div&gt;
&lt;/div&gt;[/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="&quot;list_entry_empty&quot;">
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="&quot;list_entry&quot;">
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="&quot;&quot;">
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="&quot;list_page&quot;">
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>
2024-03-10 10:36:13 +01:00
<member name="paginate" type="bool" setter="set_paginate" getter="get_paginate" default="true">
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="&quot;No content yet!&quot;">
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>