Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

feature request: HTML variable editor

Like many people in this discussion board I really appreciate the ability to put anything in variables; especially peaces of HTML with Cityscript. This can be very hard to edit and debug though.

For short variables (like links, taglines etc.) current system is ok.

For HTML: I would appreciate the complete HTML or article functionality. Would it be possible to have articles or HTML files (e.g. in a folder Variables or similar to templates) which behave like variables but can be edited as HTML? (this would also allow for copy-paste actions from other places while editing)

Adriaan van den Brand
Friday, April 26, 2002

A variable editor would be great.  In the meantime I maintain some HTML files and upublished articles to edit the variables, ultimately pasting the HTML into the variables.

tk
Friday, April 26, 2002

Here's a workaround that I use. Create an article with the HTML content that you want, for instance a stylesheet. Instead of putting the actual HTML in the variable, put in CityScript that will pull in the article:

{$ foreach 1 x in (filename "stylesheet") $}{$ x.body $}{$ next $}

So when I use the variable {$.stlyesheet$}, it pulls in the content of the stylesheet article, and I can edit the HTML in the article editor.

Jason DeFontes
Tuesday, April 30, 2002

Thanks Jason, that's going save me some trouble.

tk
Tuesday, April 30, 2002

Clever work-around! Thanx,
Adriaan

Adriaan van den Brand
Wednesday, May 01, 2002

FYI:

This technique can degrade your publishing speed, because now CityDesk has to run the foreach query and resolve it into CityScript.  It's usually not a big deal for small sites, but if you put it into a template on a large site, you would notice the difference.

Customer Service
Thursday, May 09, 2002

I don't know about anyone else, but I edit them in Frontpage. I'm not using the standard template on my site; I created all my own stuff so that I could control how it looked more closely. I do have a sidebar, and I do keep it in a variable. I edit its contents with FP; when I want to change it, I copy/paste into FP, edit it there, and copy/paste back.

FP is, of course, not free. But there are free HTML editors around which could be used that way.

By the way, I just discovered something which wasn't obvious: when you're editing variables, hitting "return" ends the editing session. But hitting shift-return inserts a newline in the variable contents without ending the editing session.

Steven C. Den Beste
Thursday, May 09, 2002

fgdfgdfg

dfg
Thursday, October 21, 2004

*  Recent Topics

*  Fog Creek Home