Hi Philipp,
Thanks for your suggestions! Philipp von Weitershausen wrote: > You don't really need to treat the action path in the menu class. You > can just as well assemble it in the Page Template where you're actually > looping over the menu items. Right. That's what I did initially, but I realised that I had to 'know' about this base URL in the page template, and possibly in other places too. <pondering>Then again, if I make a macro out of this specific menu, I only have to 'know' the base URL in one place and I can leave out the custom Menu implementation.</pondering> > If you need a more complex setup, e.g. have your 'stem_url' always be > the URL of some object that is not the root of your Virtual Host, you > could define a browser view (not a page!) named 'get_application_root' > or so, have that traverse the acquisition path to the object and return > it and then use that object's @@absolute_url. and > Hard coding a URL in Python is definitely not very useful. Sure. I 'hardcoded' the path in the example to simplify it. We do indeed have a facility in the application to get to the application root. I think I'll indeed follow you suggestion by creating a macro for the menu and not use the custom menu implementation. Thanks again! regards, jw -- Jan-Wijbrand Kolman [EMAIL PROTECTED] _______________________________________________ Zope3-users mailing list [email protected] http://mail.zope.org/mailman/listinfo/zope3-users
