<div>I tried this:</div>
<a tal:attributes="href string:${here/a_script}?doc=${x}">
<div>but got this error:<br>
<STRONG>Error Type: TypeError<br>
Error Value: a_script() takes exactly 1 argument (0 given)</STRONG><br>
Next, I rewrote the script to put in a try statement for the variable, to test that, but before I even got to test I looked at the rendered code from the above line and it gave me this:<br>
<<SPAN class=start-tag>a</SPAN><SPAN class=attribute-name> href</SPAN>=<SPAN class=attribute-value>"&lt;html&gt;&lt;body&gt;nope&lt;/body&gt;&lt;/html&gt;?doc=0"</SPAN>><br>
So it doesn't look like the "string:${..." workaround worked :(<br>
And I don't think I need to URLquote.<br>
TIA,<br>
Tony<br>
<br>
<br>
-----Original Message-----<br>
From: Chris Withers <chris@simplistix.co.uk><br>
To: tonylabarbara@aol.com<br>
Cc: lists@zopyx.com; zope@zope.org<br>
Sent: Wed, 15 Aug 2007 11:05 am<br>
Subject: Re: [Zope] How Do I "Structure" This?<br>
<br>
</div>
<div id=AOLMsgPart_0_518a2dd8-cf95-4fb2-8cb8-0555fbc64257 style="FONT-SIZE: 12px; MARGIN: 0px; COLOR: #000; FONT-FAMILY: Tahoma, Verdana, Arial, Sans-Serif; BACKGROUND-COLOR: #fff">Ah Tony, <br>
<br>
looks like the penny is yet to drop... <br>
<br>
<A href="mailto:tonylabarbara@aol.com">tonylabarbara@aol.com</A> wrote: <br>
> Bummer. Well, I'm trying to call a script that will render content to the Web, like this: <br>
> <a tal:attributes="href python:here.a_script(str(x))"> <br>
<br>
My guess is that what you're _really_ trying to do here is: <br>
<br>
<a href="" <br>
tal:attributes="href string:${here/a_script/absolute_url}?avar=${x}"/> <br>
<br>
...but next you'll be wondering how to url quote x. <br>
<br>
I feel we're fighting a loosing battle here... <br>
<br>
Chris <br>
<br>
-- Simplistix - Content Management, Zope & Python Consulting <br>
- <A href="http://www.simplistix.co.uk/" target=_blank>http://www.simplistix.co.uk</A> <br>
</div>
<!-- end of AOLMsgPart_0_518a2dd8-cf95-4fb2-8cb8-0555fbc64257 --><div class="AOLPromoFooter">
<hr style="margin-top:10px;" />
AOL now offers free email to everyone. Find out more about what's free from AOL at <a href="http://www.aol.com?ncid=AOLAOF00020000000437" target="_blank"><b>AOL.com</b></a>.<br />
</div>