| OdesÃlatel: Tino Wildenhain <tino@wildenhain.de> | --On Mittwoch, 23. Oktober 2002 11:26 +0100 Jaroslav Lukesh | > localroot | > <dtml-in "PARENTS[3:]">../</dtml-in> | I dont think your example serves very well because the cache | lookup would be comparable to this simple calculation, may | be the cache lookup is even costyer. It is cca 2-3 times faster when it is cached (p-233MMX, W95, MSIE4 and Zopeserver at same machine). | You can define one or more request variables as "key" for different | object versions (RAM Cache manager), so you can use PARENTS here | as well. Thanks, it works. meanwhile I was try absolute_url and it works too. I think that absolute_url is more accurate than PARENTS that could fail in some special case. | > I have few hundreds of calling localroot per page and I will be hapy if it | > will have some solution for that. I dont want migrate to siteroot because | > it makes absolute URLs, not relative. | | if localroot is a python script, you could use something like this: I do not know zope-python. I am procedural, not object programmer and zope-python is too hard for me. | Further, you are constructing links like | <someroot>/more/path/elements | | Do you think this is useful? No ;-) but I does not have something better. | You could either use /path/from/your/root (without servername) Because I have lang versions (/www/www.domain.com/en etc.), it is not good. I was try /* linking, but it failed in some case. Sure, it could have domain en.domain.com or so... | or object_to_link_to.absolute_url() object_to_link_to should not be ../../folder1/folder2/ - but sure, due acquisition you could that link as folder1/folder2/ But it is not clean. Many thanks, JL.