[Zope] Building multiple documents from fragments(objects).

Alan Young alany@idiglobal.com
Wed, 04 Apr 2001 11:31:26 -0600


Casey Duncan wrote:

> <dtml-in expr="docs.objectValues('DTML Document')">
>     <div><h3><dtml-var name="title_or_id"></h3>
>         <ul>
>             <li><dtml-var name="sequence-item"></li>
>         </ul>
>     </div>
> </dtml-in>

Sorry, I guess I didn't explain myself well enough.  I know how to do the
above, what I want to do is specify a sub set of the fragments and in what
order they should appear, so:

<dtml-in "[fragment2, fragment1, fragment3]">
    <div><h3><dtml-var name="title_or_id"></h3>
        <ul><li><dtml-var name="sequence-item"></li></ul>
    </div>
</dtml-in>

However the above gives me a syntax error:

invalid syntax

, for tag <dtml-in "[fragment1, fragment2]">, on line 7 of index_html

<dtml-in "['fragment1', 'fragment2']"> doesn't give me an error but I just
see

...
<div><h3>Build From Loop</h3>
<ul><li>fragment1</li></ul>
</div>
<div><h3>Build From Loop</h3>
<ul><li>fragment2</li></ul>
</div>
...

Any further hints?

And thanks for your help! :)

Alan