folder like shortcut / symlink / pointer / urlredirect
Hello The DTML code below populates a large menu with folders and their descriptions, however one of the items in the menu should now point to a URL on a different server. I can change the code - for example make it ordinary HTML, or add the new URL above or below, but I want to know if it is possible to make a folder-like object that points to the new URL, and will work with no change to the code below: Choose an option: </p> <dtml-in "services.objectValues('Folder')" skip_unauthorized="1" sort="menuorder"> <dtml-if "_.int(showhide)==1"> <div class="bulletList"> <strong><a href="<dtml-var absolute_url>/index.html"><dtml-var title></a></strong> <dtml-if "description!=None and description!=''"> <br /> <dtml-var description> </dtml-if> </div> </dtml-if> </dtml-in> Thanks
--On 31. Oktober 2007 08:21:01 -0800 Ben Bartrum <bba@inbox.com> wrote:
Hello
The DTML code below populates a large menu with folders and their descriptions, however one of the items in the menu should now point to a URL on a different server. I can change the code - for example make it ordinary HTML, or add the new URL above or below, but I want to know if it is possible to make a folder-like object that points to the new URL, and will work with no change to the code below:
Why does it has to be a folder? You can simple add a PythonScript that performs an URL redirection if called. You just have to added the script and adjust your loop to find folders *and* PythonScript. -aj
Andreas Jung wrote:
Why does it has to be a folder? You can simple add a PythonScript that performs an URL redirection if called. You just have to added the script and adjust your loop to find folders *and* PythonScript.
Thanks - I ended up putting only <dtml-call "RESPONSE.redirect('http://www.example.com')"> in the index.html inside the relevant folder.
participants (2)
-
Andreas Jung -
Ben Bartrum