- How can I structure my site with subdirectories ?
- What is the ideal structure of the
description file ?
- What if my site requires only one language ?
- How can I create a table with cyclic
color rows ?
- How can I create a menu without the
useless link on the current page ?
- How can I have an empty
variable/parameter, which are useful for default behaviors ?
- Does WebSitePP works under windows ?
-
How can I structure my site with subdirectories ?
You just need to write them in the page name.
The page "Toto" is at the site root, the page
"SubDir/Toto" is in the "SubDir" directory.
Note: If you use subdirectories, do no forget the RELPATH
command, which handles the conversion of a filename
starting from root to a filename starting from the current
page (relative path).
-
What is the ideal structure of the description file ?
The input file would contain only INCLUDE tags.
First ones would be dedicated to generic libraries,
and the site specific libraries.
Then would come INCLUDE tags for each page group. These
included files would contain either the small pages or an include
of the big ones.
Last would be "index" page name definitions (except the
site entry), one per directory, which would redirect toward
a page of the directory.
A directory could be dedicated to images, and another for
other data (downloadable files...)
A page definition should be reduced to a macro call,
with parameters like title, keywords and the page content. The
macro would handle the HTML formatting (header, body, main
table...) and set the content at the right place.
Such a structure has the huge advantage to allow a radical
graphic design change of all the pages just with one macro
change (it separates content and look, principle of CSS).
-
What if my site requires only one language ?
You must declare at least one language for WebSitePP to work.
So just declare one and forget it and the L tags...
-
How can I create a table with cyclic color rows ?
You just need to insert the following tests in a macro
called at each table line. The result color is in the macro
COLOR. In this example, the chosen colors are #111111,
#222222 and #333333.
For two colors, the simple test below is enough:
<IF EQUAL COLOR #111111> <DEFINE COLOR #222222> <ELSE/> <DEFINE COLOR #111111>
</IF> For three or more colors, a temporary value is needed
(test order matters):
<IF EQUAL COLOR #333333> <DEFINE COLOR temp> </IF> <IF EQUAL COLOR #222222> <DEFINE COLOR #333333> </IF> <IF EQUAL COLOR #111111> <DEFINE COLOR #222222> </IF> <IF EQUAL COLOR temp > <DEFINE COLOR #111111> </IF>
-
How can I create a menu without the useless link on the current page ?
Just set the following test around the tags <a> and around
the tag </a>, with XPAGE the page of the menu, target of the link:
<IF NEQUAL SELF_PAGENAME XPAGE>
<a href...> ou </a> </IF>
-
How can I have an empty variable/parameter, which are useful for default behaviors ?
An empty variable/macro may be created with <DEFINE
TOTO></DEFINE> but no test on it will work
because the IF tag needs to detect the value to test as a
string.
Be careful, because a IF tag without the value parameter
leads to an existence test, which totally differs.
To solve this problem, just give a particular value that
you choose for such case, "None" for instance.
-
Does WebSitePP works under windows ?
Python is a portable programming language, so WebSitePP
should work properly under windows. However no try have been
driven yet, but it is planned !
One constraint in this case: Paths must use the UNIX
notation, i.e. the "/" character instead the "\" character.
|