Learn the WebEtui Architecture

As a webdeveloper you can use the WebEtui tab "code" to access all HTML, CSS and Javascript files. You can create HTML layouts and use the functions in the WebEtui API to build your website and display the article content.

<menu>menu(label="menu.manual" maxlevel="2" hamburger="manual")</menu>
  <find>find(label="layout.api" format='<a class="find-manual" href="/[url]"><div class="itemtext"><h2>[h1]</h2><p>[p.1]</p></div></a>' order="label")</find>

Master HTML template: page.html

This file contains the HTML code that is shared by all website pages. In de HEAD section of page.html the CSS and Javascript files are added. You can also add includes of Javascript libraries or Font libraries that you want to use. In the BODY section you can add HTML code that is used for all pages of your website, for example for the header/menu and footer. For the different layouts you use for different pages you make different HTML layout fragments. To display articles, menu's and other content you can use WebEtui API calls in the HTML.

plaatje van voorbeeld page.html template

From article and label to internet address (URL)

Every article gets an unique address (url) based on the title when it is created. This page with title "Learn the WebEtui Architecture" gets url "learn-the-webetui-architecture": the title in lowercase with spaces replacee by dash. For 'detail/endpage' the article url is the last part of the address.

If an article has labels, the first label becomes part of the address. For example this page has label "menu.manual.build.architecture" and gets adress "https://www.webetui.nl/manual/build/architecture/learn-the-webetui-architecture". (label "menu" is locked which means it is invisible in url's)

From internet adress (URL) to label and article

Most WebEtui API functions convert the current internetadress (URL) to an label and/or article. This is the reverse of the previous "From article and label to internet address (URL)". The URL is an important way to select content and labels. If you use for example the API function "article()" in your HTML layout it will show the article based on the current URL.

It the address matches a label but no article, the label wil be used to select a HTML layout. For example the URL "https://www.yoursite.nl/news" can point to label "news". In the HTML layout with label "news" you can use the find() function to display (a formatted part) of all news articles ordered by date.

The label "home" is special, when the internetaddress is empty or "index" WebEtui will assume label "home". So you can label your home HTML layout and/or your home article with label "home".

Format your content with the "format" parameter