Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

City Script

I started a web site ( http://www.theRant.info ) with a friend of mine to a:) have an outlet for my insane political writing, and b:) Teach myself HTML.  Well it’s all coming along slowly but I want to know what is the current limitation if City Script?  Can you do, “If … Then “ kinds of things?  Speciffically I want to put different sets of varibals into articles based on fields like author (If author = Godzilla Then var x).  “If … Else” dosen’t do the trick. 

Is the discription of City Script in the help section the whole story?  If this is a stupid question I apologise, I’m trying to teach myself how to program and don’t really know anyone who does it. I’m also a bit thick.

Thanks!

Rick Dement
Friday, September 20, 2002

If you put the author, "Godzilla" into the keyword field you might get somewhere.  Some CityScripters have done wonders with and/not/or conditions and keywords.

If there is a something really specific you'd like to do, I'll bet someone can figure out how to do it or how to work around it.

tk
Friday, September 20, 2002

Specifically I want to add certain variables like a copyright notice, a mail to link, a link to the authors homepage, and a few other things.  I am using the extra1 and 2 fields right now but I have some other plans for those fields and I want to free them up.  (our site has a number of different contributors)

So if I could select a variable based on the authors name I could drop them into the various places in the article based on that field.  Keywords would be great to, but I don’t know how to tell CD… ( If the author field contains Godzilla, use variable X here ).  Then I could add this script wherever I want an author specific piece of information. I am getting the impression that City Script won’t do this at the present time.

There might be a better way to do this. I had thought of creating a different template for each author but I am also trying to economize on templates.

Rick DeMent
Friday, September 20, 2002

I have had a similar problem with different books which required different links to specific series and it is my experience that different templates is the easiest, but not the best, solution at this stage in CDs evolution. Several different templates with only minor differences takes less than two minutes to set up (after you have the first one ready of course), so why fight with work-arounds, that very well may create undesirable side effects? (Example in Danish here: http://www.baskerville.dk/Matematik/StartsideMatematik.html)

Jorgen Brenting
Saturday, September 21, 2002

Good point.  I have wanted to try Darren Collins idea of using variables to create tables / boxes on the fly.  I have implemented this technique and I think it's a big improvement. I am going to use a combination of variables and templates to get the desired effect.

But I'm not wrong in saying that City Script is pretty much limited to the grouping of articles using the elements on the extras and properties tabs.  Would that be a fair characterization?

Rick DeMent
Saturday, September 21, 2002

Well yes and no. The limitation, you mention, also creates very organized sites that are easy to maintain so you don't spend all your time writing html tags. And you can always throw in some fun with javascript, asp and ordinary html pages. Right now I have a totally mixed site ( http://www.baskerville.dk ) which slowly grows more and more CD, but the online store, written in asp, will probably not end up in CD the first couple of versions. All in all CD is a great time saver and that's what count most when you have something to write about and don't want to play the Little Programmer each day.

Jorgen Brenting
Saturday, September 21, 2002

*  Recent Topics

*  Fog Creek Home