Zope tag nesting madness!

Stephen Coursen coursesm at sbdhcp-4022.statenisland-ny.est.tcg.com
Mon Oct 9 09:44:08 EDT 2000


On Mon, 09 Oct 2000 07:46:26 GMT, noahspurrier at my-deja.com
<noahspurrier at my-deja.com> wrote:
>Hello,
>
>How do I nest <dtml-var> tags inside of <dtml-in> tags?
>
>In general I want to pass an <dtml-var> to a ZSQL Method,
>but <dtml-var> must be an INTEGER. This syntax will not work:
>    <dtml-in "show_article(article_id=<dtml-var id>)">
>The manager editor will compain about this and will not even let me
>submit this change. I get this error:
>    invalid syntax
>    , for tag <dtml-in "show_article(article_id=<dtml-var id>)">,
>
>The problem here is that I have to pass id as an INTEGER. The editor
>will accept this syntax:
>    <dtml-in "show_article(article_id='<dtml-var id>')">
>but article_id is NOT a string, so the database complains if
>I try to run it with this syntax. Essentially it seems like I can
>only do this if I want to pass my parameters as strings.
>How do I pass integers?
>

Try:
    <dtml-in "show_article(article_id=id)">
    ...
    </dtml-in>
    
Within the quotes, you can enter valid Python code, such as variable
references, without resorting to using DTML tags.

HTH,
Steve Coursen

[snip]



More information about the Python-list mailing list