Christian Leutloff wrote:
> Hi,
> I want to add a round to a small Zope based web site. Therefor I would
> like to add a prev and a next button on each page. So it is possible
> to start on the first page and then move on to the next one by
> clicking on the next button. After some clicks on the next button I'm
> sure to have visited all pages.
> I want to realize this goal through adding an attribute named sequence
> (´seq´) to every DTML document that should be reached through the
> round. The value is a 4 digit number that defines the order in which
> the pages should appear. Then I've started to implement a method using
> DTML to generate the hyperlinks for prev/next. The strategy would be
> to determine the sequence number of the actual document. Afterwards
> all documents are searched and each id is compared to the actual
> one. The results should be saved in variables that could be used to
> set up the links after all documents have been processed.
> My problem is now how to store the intermediate results in
> variables. I'm able to define a variable (myseq), but I'm not able to change
> the value afterwards:

I 'feel' like I may not know everything you're wanting to
accomplish, but.

By, 'small', do you mean 50 pages, 100 pages?  

How about each page gets an id  that will put it in the proper
order when it is appended to a list and then sequenced through? 
Start out with id's that are, maybe 10 numbers apart so that you
can easily insert pages in the sequence with out renumbering the
other pages. Or you could just as easily use your 'seq' property.

Create and append to a list each of the pages sorted by id. Then
your NEXT PREVIOUS links will be to; sequence-index +1 and
sequence-index - 1.


-- Tim Cook --
FreePM Project Coordinator
OS Health Care Alliance Supporter

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to