[Zope] Clever solution wanted
Tille, Andreas
TilleA@rki.de
Tue, 22 Jan 2002 12:09:24 +0100 (CET)
Hello,
I have the following problem: The web pages of our institute has a
menu frame (please don't throw anything at me about the frames - I do not
like it but now I have to cope with it) with links. Those links have
the following structure:
<a href="URL1"> target="target-frame1">text1</a><p>
<a href="URL2"> target="target-frame2">text2</a><p>
<a href="URL3"> target="target-frame3">text3</a><p>
...
Because there are many different web editors they sometimes use
<br> instead of <p> or do some other nasty formating. This is all
done in plain HTML and I slowly want to move the stuff to Zope.
I'd like like to provide a general dtml document which no editor has
to care about. I'm now searching for a method where the different
editors of those menu links just have to care for the content like
editing a simple table:
"URL1" "target-frame1" "test1"
"URL2" "target-frame2" "test2"
"URL3" "target-frame3" "test3"
This table should be read into the dtml document and should be
displayed there in a loop) to get equal layout. In the end of the
mail I append my first approach to it but I feel that this is
really not the best way to go.
I'm looking for a more clever solution than I could imagine (as a
quite beginner in Zope).
Kind regards
Andreas.
My own not so clever solution:
<dtml-comment>*** please use the following scheme for your links
('URL', 'target-frame', 'text'),
*** Do not change any other things inside this document ***</dtml-comment>
<dtml-let
links="(('http://www.zope.org', '_top', 'Zope'),
('http://somewhere.else', '_bottom', 'Other Link'),
...
('index.html', '_parent', 'Home'))">
<dtml-comment>****** Do not change anything below this line *****</dtml-comment>
<dtml-in links>
<dtml-comment>
<dtml-var "_['sequence-item'][0]">
</dtml-comment>
<p><a id="mainlink" href="<dtml-var "_['sequence-item'][0]">" target="<dtml-var "_['sequence-item'][1]">"><dtml-var "_['sequence-item'][2]"></a></p>
</dtml-in>
</dtml-let>