[Zope] Referencing a Zope Instance through a Hyperlink

Martijn Pieters mj@digicool.com
Wed, 8 Mar 2000 22:23:29 +0100


From: "M.J. Stahl" <mjstahl@bizux.net>
>
> I have a group of ZClass (DCTasks) stored in a folder
> '/tasks/generator/taskstorage'
>
> The index_html of '/tasks' is the interface to view the instances and
> certains properties that are saved on those instances. One of the
> properties is 'task_title' and is displayed as a hyperlink to view the
rest
> of the properties of the instance.
>
> This is my problem, when I check the source of the page
(/tasks/index_html)
> and I take a look at the hyperlinks for viewing the properties of the
> instance, it gives a URL like so:
>
> http://diis/tasks/generator/taskstorage/<string>
>
> <string> should actually be replaced with the 'id' of the instance. This
is
> so by the DTML code for index_html:
>
> <a href="<dtml-var URL1>/generator/taskstorage/<dtml-var id>">
>   <dtml-var task_title>
> </a>
>
> I have no idea why a string is taking the place of <dtml-var id> in
> referance to the instance.
>
> Any ideas would be helpful.

I bet your ZClass inherits from either DTML Method or DTML Document, and
then the following article applies:

  http://www.zope.org/Members/AlexR/ZClassIDBug

Martijn Pieters
| Software Engineer    mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope       http://www.zope.org/
|   The Open Source Web Application Server
---------------------------------------------