[Zope] Acquisition breaking my tal:attributes="href ..." (I think)

Jon Whitener wmmail@twmi.rr.com
Wed, 27 Nov 2002 00:31:54 -0500


How can I circumvent this apparent effect of aquisition?

I have a Zope Page Template like so (for a cable TV company Website):


1 <ul tal:repeat=
2 "package python:root.services.digital_tv.packages.objectValues('Cable Package')">
3  <li><a href="HREF" 
4  tal:attributes="href package/feature_list/absolute_url" 
5  tal:content="package/title_or_id">PACKAGE TITLE OR ID</a>
6  </li>
7 </ul>


'Cable Package' is a very simple folderish ObjectManager ZClass.

My only problem is in line 4.  Because all the Cable Package objects acquire the "feature_list" ZPT object from their common parent directory ("packages"), absolute_url resolves to the following in every iteration:

  ~/services/digital_tv/packages/feature_list

This is no good.  I want HREF in the different iterations of the "package" repeat variable to resolve to paths specific to the current Cable Package object, e.g.:

  ~/services/digital_tv/packages/gold/feature_list
  ~/services/digital_tv/packages/silver/feature_list
  ~/services/digital_tv/packages/platinum/feature_list

(Where gold, silver, and platinum are Cable Package objects within folder "packages".)

The actual, aquired feature_list ZPT (in the "packages" folder) in turn calls the individual Cable Package's channel_list method.  It all works great when I call the correct URLs directly, because "here" is properly defined in the feature_list template as below:


<table tal:repeat="channel here/channel_list">
 <tr>
  <td tal:content="channel/title_or_id">TITLE OR ID</td>
  <td tal:content="channel/number">000</td>
 </tr>
</table>


So, how do I get line 4 in the first snippet to stop resolving to the URL of the acquired feature_list, and instead return the Cable Package-specific URL (gold, silver, platinum)?

Thanks so much for caring enough to read this far!
Jon 
Detroit, Michigan, USA