Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Location-specific variables

I have a CD site with 3 template families.  Each are published to a self-named subdirectory.  I'm trying to provide links between template families so the user can pick which template family (page style) they prefer.

According to the CD help file "Using Template Families", it is recommended that you use the URL with the .abslink variable. (see bottom of topic page)

To simplify this even further, I created a variable .SiteURL, so that my templates look like:

a href="{$.SiteURL$}{.abslink$}"

I also have two publish locations (e.g. "Test" and "Production").  I'd like to have the SiteURL variable change based on which location/server I publish to:

Test -> .SiteURL = "http://testserver"
Production -> SiteURL = ""

Is there any way to accomplish this, outside of manually changed the variable value before publishing?  Just trying to idiot-proof the process.

Joe Paradise
Sunday, September 7, 2003

Oops!  The links should read:

a href="{$.SiteURL$}[TemplateFamilyName]{$.abslink$}"

Joe Paradise
Sunday, September 7, 2003

why prefixing the siteurl within your site? If use "/" before the {$.abslink$} it should be ok within each site.

Adriaan van den Brand
Monday, September 8, 2003

That did it!  For some reason I thought I tested that before and found it didn't work (something with the template family subdirectory).

Thanks Adriaan.

Joe Paradise
Monday, September 8, 2003

*  Recent Topics

*  Fog Creek Home