[Zope] Calling Script with parameters via HREF

Andy Jewell s9uayj@fanniemae.com
Fri, 5 Oct 2001 11:17:50 -0400 (EDT)


>From a newbie to all the Zope community I have to say - thanks for the
documentation!  I've been trudging through it all morning trying to learn
this namespace stuff.  Thanks to Dieter and the information below, I think
I was finally able to do what I wanted.  I created a script that does a
ZopeFind on a certain segment of my tree to find one document.  So,
calling it like this returns the document, just like I want:

<dtml-var "findProcedure('My Procedure')">

That's because I'm returning a DTML Document object and dtml-var seems to
like that.  My question (probably easy but I can't get it, nonetheless) -
how can I put that in a link?  I try this:

<a href="../findProcedure?procName='My Procedure'">Get Procedure</a>

Which should find it but I think since it's returning the object itself
and not the "rendered" HTML, it doesn't work.  Should this be working or
am I doing something wrong??  Thanks for your help!


Andy



On Tue, 25 Sep 2001, Dieter Maurer wrote:

> Reif Peter writes:
>  > ...
>  > My script:
>  > 
>  >   ...
>  >   ##bind namespace=namespace
>  >   ...
>  > 
>  >   zone = namespace.zone
>  >   return zone
>  > 
>  > It is called from a DTML-method where the tag <dtml-var zone> is rendered
>  > correctly:
>  > 
>  >   ...
>  >   <dtml-var get_status_a>
>  >   ...
>  > 
>  > Error:
>  > 
>  > Zope Error
>  > Zope has encountered an error while publishing this resource.
>  > Error Type: AttributeError
>  > Error Value: zone
> How is it called?
> 
> Implicitly (<dtml-var myPythonScript>) or explicitly?
> 
> In the second case, you must pass the namespace yourself!
> In the first case, check in the binding tab that
> the binding really took place.
> 
>   PythonScripts are quite picky with the binding comments
>   at their start. A minor typo and part of the comments
>   are no longer recognized.
> 
> 
> Dieter
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
>