[hypermail] Template "Substitution Cookies"

From: Bill Moseley <moseley_at_hank.org_at_hypermail-project.org>
Date: Fri, 28 Dec 2001 22:44:01 -0800
Message-Id: <3.0.3.32.20011228224401.022e02c4_at_pop3.hank.org>


I think I need a new cookie. I need one that will help me create relative links back to the top level directory when using folders to spread out the archive.

The problem is I'm using the same template file for more than one archive. When all files are in the same directory I can simply use relative links in the template file and everything works (and the archives are relocatable), and same the templates can be used for a number of lists.

So, what would be helpful is something like %t which is a relative path to the top level directory. So, if say in my config dir = foo

   when in ./foo %t = "." and I can build a link %t/search.cgi    when in ./foo/2001/52 (year/week) %t = "../.." and %t/search.cgi    still works because it I end up with "../../search.cgi"

The same problem happens with "Other mail archives" link.

I can set the "dir" config option to an absolute path, and use the cookie "%~", but then the archive is not relocatable.

I can try to hack this myself, but I'm not sure where to start in the source. I'd just need a "depth" count and a place to hook in a new cookie.

Any suggestions?

Thanks,

-- 
Bill Moseley
mailto:moseley_at_hank.org
Received on Sat 29 Dec 2001 08:47:57 AM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:12 AM GMT GMT