Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Reintroduced bug?

I thought this was fixed in Beta 2.0.1, but I may have been mistaken.

In any case, in CityDesk 2.0.3, switching to normal view in templates overwrites variables.

To reproduce.
1.  Create a template using variables for colors, such as body bgcolor, colors in tables, etc.
Example:
<body bgcolor="{$.BodyBackground$}">
2. Switch to normal view, look at the ugly green colors, switch back to html view and notice that your variables are gone.
<body bgcolor="#00ba00">

David Burch
Monday, May 26, 2003

Hi
You might want to use a css-File for defining these things:
- make a new file (html-File) rename it for e.g. to content.css, insert your definitions, for e.g.:

body {background-color:#FFFFCC;
}

h1 {
  font-family:arial,helvetica,verdana;
    font-size:24px;
    font-weight:bold;
    text-decoration:none;
  color:#660000;
}

p,ul,li {
  font-family:arial,helvetica,verdana;
    font-size:12px;
    font-weight:normal;
    text-decoration:none;
  color:#000000;
}

- In your template define the link to that CSS by inserting the following code in the <HEAD>-Part:
<LINK rel=stylesheet type="text/css" href="PTMFOG0000000070.css">

PTMF.... is the MagicName of your CSS-File, of course.

Doing so you define all font types and colours, background colors and so on in that single css-file. Very useful.

Hope that helps.

Regards,
Stephan

Stephan Germain
Tuesday, May 27, 2003

I don't know if that was ever fixed in CD2...

I agree that CSS is the way to go here. You can still maintain the look & feel in one spot rather than on the individual pages...

www.MarkTAW.com
Tuesday, May 27, 2003

CSS is great; CityDesk shouldn't eat your variables.

David Burch
Tuesday, May 27, 2003

The bug was still there in 2.0.1.  I'd reproduced it.  CSS is the workaround.

David Blume
Tuesday, May 27, 2003

For numerous reasons too complicated to explain, CityScript *inside* html tags <> is not supported except as attribute values in places where HTML allows arbitrary text, such as href tags, src tags, alt tags. In the case of colors, HTML requires a valid color. If you put in CityScript, the HTML wysiwyg editor tries to interpret your script code as a color, and, failing that, assumes you meant "black."

Joel Spolsky
Tuesday, May 27, 2003

*  Recent Topics

*  Fog Creek Home