Hei!
I have with zope developed some simple e-learning program which
teach users safety and
security topics such as “fire protection”, “first aid”,
“environmental
policy” and so on. It is intended for hotel staff personnel.¨
The program is actually only
a large number of web pages with information.
As in a book this information
is divided into chapters and subchapters.
In zope this is done using
folders. I have one folder called “Fire_protection”,
one called
“First_aid” and so on. These folders then have their subfolders,
and subsubfolders. These
folders share some methods like the
standard_html_header,
standard_html_footer, and a method for generating a
table of contents at the
first page in each chapter or subchapter.
Now, at the bottom of each
page, I have some navigation buttons. Depending
on where you are in the
learning program these are:
“previous”,
“next”, “table of contents”, “first topic”
and “back to start”. The
buttons are generated using a
form action method like this:
<td>
<form action="<dtml-var
first_topic>">
<div class="form-element">
<input class="form-element"
type="submit" value="First Topic">
</div>
</form>
</td>
The <dtml-var
first_topic> refers to a property with the name “first-topic”
that I
manually give to the folder
which holds the first topic in this chapter. The value
of this property could for
instance be “fire_protection_11”. Consequently, I have
manually, and for each folder
and subfolder on the entire site, created properties
for “previous”,
“next”, “table of contents” and “first
topic”. Each time I create some
subchapter somewhere in the
site, I have to manually change the
values of these navigation
properties in the neighbor previous and next subchapter. This in
order to have their
navigation buttons point to my new subchapter.
This is not very dynamic.
Ideally I should have one navigation method in the rootfolder,
that created all the
navigation buttons on all the pages of each chapter and subchapter
automatically. And if I added
or deleted some chapter (folder) somewhere in the site, this navigation
method should automatically
update my navigation buttons. Do you have any idea of
how I could create such a
navigation method, or in any other way accomplish this?
Best wishes and kind regards
Børge Kjeldstad