On Sat, Mar 22, 2003 at 06:41:46PM -0500, George Clark wrote:
> By changing the default template from cl.gif to cl[%
> user.bg.2.replace('#', '_') %].gif, the file name is automatically
> merged with whatever color is specified in the background colors for the
> section. Since the # in the color variable is not usable in a URL, the
> replace changes it to an underscore.
>
> <IMG SRC="[% constants.imagedir %]/cl[% user.bg.2.replace('#', '_')
> %].gif" WIDTH= ....
> ...
> <IMG SRC="[% constants.imagedir %]/cr[% user.bg.2.replace('#', '_')
> %].gif" WIDTH= ....
>
> To my surprise, it actually worked. This is going to save me a boatload
> of work when upgrading templates. I can get rid of almost all of my
> custom section templates.
It seems to me that you ought to be able to use %23 (ASCII '#' in hex)
in the URL and avoid the replace(). Haven't tried it, though.
-- Roger
--
Roger H. Goun Brentwood Country Animal Hospital, P.C.
Chief Kennel Officer Exeter, New Hampshire, USA
|