For each project, you need to install the software to a directory for that project. Once you have run the install script, Webez will use absolute paths. This means that if you want to move or copy the project, you must re-run the install script. For each new project, you need to re-run the install script.
The installation creates various directories. These are explained in detail in the "Directory structure" topic. The ones that you need to be aware of now are:
/cache
- This contains the PHP files that Webez
generates. There are two cache directories. By default, Webez uses /cache1
/config
- All the source files go here. You create
most of the files. Webez automatically generates some files, which you
can modify./html
- This contains any existing static web pages
that will be included into the site that you are developing.To install Webez
For convenience, we will test in two stages. First, we check that Webez 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 Webez and the database works.
We will create the configuration file and a simple template. Webez 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 Webez 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 Webez 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.
Webez 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.