[ZDP] automatic navigation devices

Chris McDonough chrism@zope.com
13 May 2003 10:19:34 -0400


Hi B=F8rge,

You should probably ask this on the main Zope maillist (zope@zope.org).

- C

On Tue, 2003-05-13 at 05:32, B=F8rge Kjeldstad wrote:
> Hei!
> =20
> =20
> I have with zope developed some simple e-learning program which
> teach users safety and security topics such as =93fire protection=94, =93=
first
> aid=94,
> =93environmental policy=94 and so on. It is intended for hotel staff
> personnel.=A8
> =20
> 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
> =93Fire_protection=94,
> one called =93First_aid=94 and so on. These folders then have their
> subfolders,
> and subsubfolders. These folders share some methods like the=20
> standard_html_header, standard_html_footer, and a method for generating
> a
> table of contents at the first page in each chapter or subchapter.
> =20
> Now, at the bottom of each page, I have some navigation buttons.
> Depending
> on where you are in the learning program these are:
> =93previous=94, =93next=94, =93table of contents=94, =93first topic=94 an=
d  =93back to
> start=94. The
> buttons are generated using a form action method like this:
> =20
> <td>
>   <form action=3D"<dtml-var first_topic>">
>   <div class=3D"form-element">
>   <input class=3D"form-element" type=3D"submit" value=3D"First Topic">
>   </div>
>   </form>
> </td>
> =20
> =20
> =20
> The <dtml-var first_topic> refers to a property with the name
> =93first-topic=94 that I
> manually give to the folder which holds the first topic in this chapter.
> The value
> of this property could for instance be =93fire_protection_11=94.
> Consequently, I have
> manually, and for each folder and subfolder on the entire site, created
> properties
> for =93previous=94, =93next=94, =93table of contents=94 and =93first topi=
c=94. 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.
> =20
> 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?
> =20
> Best wishes and kind regards
> B=F8rge Kjeldstad
> =20
> =20
> =20
> =20
> =20
> =20
> =20