For convenience, we will test in two stages. First, we check that Arcos is working correctly by creating the simplest of web sites — a single web page. Then in the next topic we check that the integration between Arcos and the database works.
We will create the configuration file and a simple template. Arcos will use the template to generate a page that is displayed in a browser.
To test the project installation
configuration.1.xml
in the /config
directory. The file should contain the following XML (explained later):<Configuration> <Page PageName="welcome"> <SYS_Display_Template TemplateFile="LOCAL_welcome"/> </Page> </Configuration>
welcome.html
in the /config/template
directory. The file should contain the following HTML:<HTML> <BODY> <H1>Hello World!</H1> </BODY> </HTML>
welcome.html
file. The URL consists of the base URL followed by the file name (you do not need to type the .html extension).<Configuration>
Each configuration file must start with this tag.
<Page PageName="welcome">
This tells Arcos that we want it to generate a web page with the name welcome.html
. We do not need to add the .html extension.
For a full explanation of all Page the properties, see Page built-in tag.
<SYS_Display_Template TemplateFile="LOCAL_welcome"/>
This tells Arcos which template to use. The template file is specified in two parts:
LOCAL_
This indicates that the template resides in the /config/template
directory.
welcome
This is the name of the template. In this case, the template and the name of the page are the same. This not strictly necessary, but for clarity, we recommend that you follow this convention wherever possible.
Arcos uses strict nesting. This SYS_Display_Template
tag does not have a closing tag, therefore, at the end of the line there is />
. (Compare this to tags such as Configuration
, which have a corresponding closing tag.)
</Page>
and </Configuration>
Closing tags.