Am Donnerstag, 28. April 2005 21:45 schrieb Garrett Smith: > I think you want this: > > principal/++adapter++hf/@@absolute_url > > Personally, I don't care for the shortcut syntax -- it's not clear > what's going on (at all). It also doesn't appear to support what you're > trying to do.
Sorry, I need to come back to you. The syntax above works perfect in ZPT templates but I can not make it working in menuItem action="..." the string I put in the action attribute is simply concatenated to the URL and not interpreted. Thanks, Florian > > Florian Lindner wrote: > > Am Donnerstag, 28. April 2005 16:43 schrieb Garrett Smith: > >> I dont know whether action is evaluated or just passed through. But > >> I use the notation: > >> > >> foo/++adapter++myadapter/bar > >> > >> for path adapters. There might be a short-cut syntax, but I don't > >> recall what it is. > > > > I've found at that the problem is another one: > > > > Iterating of the keys of the object works: > > > > <div tal:repeat="itm request/principal/hf:keys"> > > <span tal:replace="itm">test</span> > > </div> > > > > hf returns a object derived from IContainer for the Interface and > > BTreeContainer for the Implementation. > > > > But I want the URL of the object hf returns. Everything I tried with > > absolute_url does not work. Of course I can add a method which returns > > zapi.absoluteURL(self, self.context) to the object but I'm sure there > > a better way. How to get the URL of the object... > > > > Thx, > > > > Florian > > > >> Florian Lindner wrote: > >>> Hello, > >>> I've a a IPathAdapter: > >>> > >>> <adapter > >>> for="zope.security.interfaces.IPrincipal" > >>> provides="zope.app.traversing.interfaces.IPathAdapter" > >>> factory=".homefolder.getHomeFolder" > >>> name="hf" /> > >>> > >>> (from Stephans HomeFolderManager) > >>> > >>> Now I want a menu item that is pointing to that homefolder. How can > >>> I do that? > >>> > >>> <menuItem > >>> action="principal/hf" > >>> [...]" /> > >>> > >>> Does not work? > >>> > >>> Thx, > >>> > >>> Florian > >>> _______________________________________________ > >>> Zope3-users mailing list > >>> [email protected] > >>> http://mail.zope.org/mailman/listinfo/zope3-users _______________________________________________ Zope3-users mailing list [email protected] http://mail.zope.org/mailman/listinfo/zope3-users
