article()

Show the article with included media in HTML. With the parameters format and part you can present part of the article in your own html-format.

parameters

url
URL from article (default: from internet address/url). You seldom have to specify the url yourself, usually the url from the internetaddress is used.

format
Use custom HTML format with references to parts of the selected article. You can refer to a part of the article by tagname and index between []. For example [h1] for the title or [h2] for the first heading 2 or [p] for the first paragraph. Add a dot-number to specify other tag elements. [h2.3] for the third heading2 or [p5] for the fifth paragraph. [url] gives you the addres of the article and can be used within the href attribute of the a tag for a hyperlink. [date] can be used for the published date of the article. [photo.N] for the n-th photo of the article. You can use this same parameter with find().

parts
show only parts of an article, for example "till the first h2" or "from the second paragraph (p)". This parameter can be used in a HTML layout to split an article in two parts, en put an webetui function in between. For example to insert the output from another function.

documentlist="1"
Add unordered list at the and of the article with links to article documents. The text of the links are the "text" attribute of the document or de basename of the file.

description

article() can be used directly in your page.html master template or your HTML layouts. It is also used by the functions find() and search() to display parts of the article. These functions have the same format parameter to specify what to display.

examples

article()
Show the complete article. (use the article based on the url)

article(format='<h1>[h1]</h1><p>[p.1]</p>')
Show only the title (h1) and the first paragraph.

article(format='<a href="/[url]">[photo]<h2>[h2]</h2><p>[p.1]</p></a>')
Show a hyperlink with the first photo, title and first paragraph of the selected article.

article(parts="h1 .. h2")
Show the html from the first h1 till (not including) the first h2.

article(parts=" .. h2")
Show the html from the start to (not including) the first h2.

article(parts="h2 .. ")
Show the html from the first h2 to the end.