2022-08-21 00:40:49 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-08-26 22:41:21 +02:00
<class name= "PagedArticleWebPage" inherits= "WebNode" version= "4.1" >
2022-08-21 00:40:49 +02:00
<brief_description >
2022-08-23 13:09:12 +02:00
Using this class, a small self contained multi page article can be created.
2022-08-21 00:40:49 +02:00
</brief_description>
<description >
2022-08-21 22:46:32 +02:00
Using this class, a small self contained multi page article can be created.
It will load every file from a folder ([code]articles_folder[/code]) in alpahbetical order, parse them as markdown, and create a paginated page from every single one of them. Additionally it will also serve a folder if it's [code]serve_folder[/code] property points to an existing folder. These can be accessed at [code]...articles_url/files/[/code]. If [code]serve_folder_relative[/code] is true (default), then this folder is relative to the [code]articles_folder[/code]. This makes it possible to serve images, videos, custom css, javascript, etc. for a PagedArticle, while all of the article's data can reside in one folder.
If it finds a summary.md, it will serve it as the root, else it will generate one.
The links is generates currently look like: [code]/01_test.md[/code]
As an example let's take this folder:
[code]article/
-- article_files/
---- test.jpg
-- page1.md
-- page2.md
-- summary.md[/code]
2022-12-22 19:51:25 +01:00
A [PagedArticleWebPage] is pointed to the [code]article[/code] folder, it's [code]serve_folder[/code] property is set to [code]article_files[/code], and is accessible at [code]http://127.0.0.1/test_article[/code]:
2022-08-21 22:46:32 +02:00
[code]Opening: http://127.0.0.1/test_article will send summary.md rendered as html.
Opening: http://127.0.0.1/test_article/page1.md will send page1.md rendered as html.
Opening: http://127.0.0.1/test_article/page2.md will send page2.md rendered as html.
Opening: http://127.0.0.1/test_article/files/test.jpg will send test.jpg.[/code]
2022-08-21 00:40:49 +02:00
</description>
<tutorials >
</tutorials>
<methods >
2023-06-13 17:34:41 +02:00
<method name= "_generate_summary" qualifiers= "virtual" >
<return type= "void" />
<description >
</description>
</method>
<method name= "_load" qualifiers= "virtual" >
<return type= "void" />
<description >
</description>
</method>
2022-08-21 00:40:49 +02:00
<method name= "generate_summary" >
<return type= "void" />
<description >
2022-08-21 22:46:32 +02:00
generates a summary page containing all article links. This is used as the index if summary.md is unavailable.
2022-08-21 00:40:49 +02:00
</description>
</method>
2023-06-13 17:34:41 +02:00
<method name= "load" >
<return type= "void" />
2022-08-21 00:40:49 +02:00
<description >
2023-06-13 17:34:41 +02:00
Manually loads everything.
2022-08-21 00:40:49 +02:00
</description>
</method>
2023-06-13 17:34:41 +02:00
<method name= "page_get" >
2022-08-21 00:40:49 +02:00
<return type= "String" />
2023-06-13 17:34:41 +02:00
<argument index= "0" name= "url" type= "String" />
2022-08-21 00:40:49 +02:00
<description >
</description>
</method>
2023-06-13 17:34:41 +02:00
<method name= "page_remove" >
2022-08-21 00:40:49 +02:00
<return type= "void" />
2023-06-13 17:34:41 +02:00
<argument index= "0" name= "url" type= "String" />
<description >
</description>
</method>
<method name= "page_set" >
<return type= "void" />
<argument index= "0" name= "url" type= "String" />
<argument index= "1" name= "data" type= "String" />
2022-08-21 00:40:49 +02:00
<description >
</description>
</method>
</methods>
<members >
<member name= "articles_folder" type= "String" setter= "set_articles_folder" getter= "get_articles_folder" default= """" >
2022-08-21 22:46:32 +02:00
The folder containing the articles.
2022-08-21 00:40:49 +02:00
</member>
2023-06-13 17:34:41 +02:00
<member name= "max_pagination_links" type= "int" setter= "set_max_pagination_links" getter= "get_max_pagination_links" default= "10" >
</member>
<member name= "pages" type= "Dictionary" setter= "set_pages" getter= "get_pages" >
</member>
2022-08-21 00:40:49 +02:00
<member name= "serve_folder" type= "String" setter= "set_serve_folder" getter= "get_serve_folder" default= ""files"" >
2022-08-21 22:46:32 +02:00
The folder that should be served. It could contain images, css, etc. These files are accessible under [code]...articles_url/files/[/code].
2022-08-21 00:40:49 +02:00
</member>
<member name= "serve_folder_relative" type= "bool" setter= "set_serve_folder_relative" getter= "get_serve_folder_relative" default= "true" >
2022-08-21 22:46:32 +02:00
Whether this folder is relative or not to the articles_folder.
2022-08-21 00:40:49 +02:00
</member>
2023-06-13 17:34:41 +02:00
<member name= "summary" type= "String" setter= "set_summary" getter= "get_summary" >
</member>
2022-08-21 00:40:49 +02:00
</members>
<constants >
</constants>
</class>