[Zope] Passing arguments with hyperlinks
Ron Bickers
rbickers-dated-997759425.bb541f@logicetc.com
Mon, 6 Aug 2001 23:23:45 -0400
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> I have a ZSQL Method that takes an argument (teamid). I want to
> pass this argument using a hyperlink. The idea is to click on a
> Firm's name and be taken to a detail that includes all the team
> members for that project. The data all comes from an existing
> Access database. All I need is the teamid, but obviously it is
> different for each row. I was thinking <a href="<dtml-var
> ProjTeamMembers teamid=<dtml-var FirmTeamID>"><dtml-var
> FirmName></a>. But I don't think this will work.
> ProjTeamMembers is the dtml Method that calls the ZSQL method
> using a <dtml-in>. What is the proper approach to this problem?
> Is there a good way to store a bunch of info about rows returned
> from a ZSQL Query. I've briefly heard of pluggable brains,but....
Hi Michael,
You can create links like this:
<a href="ProjTeamMembers?teamid=&dtml-FirmTeamId;"><dtml-var FirmName></a>
When you click on it, ProjTeamMembers will be run with the variable 'teamid'
in the namespace. When you call your ZSQL method, you just pass it the
argument, as in:
<dtml-in expr="myZSQLMethod(teamid=teamid)">
...display team member...
</dtml-in>
This should give you what you're looking. You don't need pluggable brians
for this.
_______________________
Ron Bickers
Logic Etc, Inc.