TK's CityDesk Help Reference

Tips from the CityDesk Forum

Tips from the CityDesk Forum

Saturday, January 19, 2008

The most recent tips go on top.

Thursday, December 15, 2005

Importing an existing web page

Using the filedDate and modifiedDate variables for the unique ID

How do I write to a unicode binary column when importing into the data base with a script

Create google site map with CityDesk

New website, using CD for offline content. Using CD, iBrowser Mobile, to create and maintain offline / desktop applications from Telepark

New Free CityDesk Utility that allows me to essentially add as many extra fields (in a manner of speaking) as I need to any article

Use Next Loop to Generate Grid of Thumbnails?

PHP templating in CityDesk: a brief tutorial from Telepark. Here is a brief tutorial I (Patrick Thomas) wrote up on how one can use CityDesk for PHP development using the TinyButStrong (PHP) templating engine. a zip file.

Word-2-CityDesk: smart transfer utility released from Telepark removed MS Word formatting

Help setting up my RSS feed

PHP templating in CityDesk: a brief tutorial

Word-2-CityDesk: smart transfer utility released

CityDesk "keyword" blocks PHP ??

I want to integrate coppermine (image gallery) on a Citydesk made website, I tried to insert a frame in an article with src = "My imagegallery", but it does not work.

keywordContains only accepts a literal string? Right, can't use a variable or extra field.

CityDesks for a big Intranet-Project? (Future of CD)

Using Folders as categories

Microsoft update KB891781 breaks template saving and how to solve the problem.

Here is the CityDesk Knowledgebase article on the fix:

"CityDesk Crashes Attempting to Close Template Window or HTML Window"

Is it possible to use Citydesk WITHIN a FrontPage website?

From UTF-8 to windows-1251 - webserver issue

I want to change the color of a cell in my navigation if I happen to be on that page.

How the readers can print articles published ? (obtain a printer friendly page ?)

Department has a bunch of PDF documents, and would like to put them on the intranet. Is there a way to create a script or article that can show a "table of contents" or list with links to open them?

You cannot currently have article variables in the expression part of CityScript - Embedding Error with  if nonblank x.sidebar

Previewing CityDesk ASP.NET sites on local PC

Changing field names in properties/extras pages of articles

Tree navigation possible?

New Contributer Edition + VANTAA Wizard bundle - a free download

Using Terminal Services to connect to a remote desktop and run CityDesk from there

CityScript in Javascript to produce a slide show

CityDesk is publishing articles with the wrong extension (how to mange this with publish locations for multiple languages)

Where I can find free CityDesk Database Scripter utility on Telepark website

How to Require Page Refresh (but do you really want to)

Can a directory name contain a period? Yes, and no.

Is there a simple way for me to generate a list of links that doesn't link the current article, but still prints its title?

Unfortunately at this point you can't use a variable as part of the condition.  It has to be a hardcoded value.

How to prevent CityDesk from adding these extra generator and citydesk meta tags

Using articles not published in a published site

I would like to create an hierarchical menu with cityscript

There are many of the posts about this subject

How to Use Firefox for Preview

Today we uploaded the English version of our free JUUKA CityDesk Wizard bundle (JUUKA + CityDesk starter edition).

Here is the German version

Using CD to Generate Photo Slideshow download

Simple DHTML Treeview download

Using  "Search Maker Pro" with CityDesk

How to List Index Files in Several Folders

Showing Folder Names with CityScript and java script

Active Scripting with CityDesk

How to insert entire directories of files into CityDesk

"before" "between" and "after" in loops

Using Keywords as links

How to do a select form with CityScript?

Making a search work on a site on CD-ROM

Doing Forms and protecting them in normal view

Using Template Families and using publish locations to make change the default (family) publish locations.

How can I enter an asp file in CityDesk

I've found that whenever I copy an article named "index" from one folder to another (which I often do to save time), the copy gets published with the filename "index-2.html". Doing the rename trick above sets it back to "index.html".

ASP, conditional CSS, City Desk, voila See how Deb did it here.

Javascript  or .asp "go back" function

User selected folders - helping users select a batch of links using variables

Producing a thumbnail picture gallery. Read down a little in the topic.

Use "even" to select the second article. This is a nice trick from Dave.

Running batch HTML Tidy on files before publishing: figuring out how to do it.

Swithcing Views mangling HTML (not the first post like this but has links to other posts and some good advice

Javascript Bookmarks: Is it possible to create a "Bookmark this page"

Publish to Microsoft Word with CityDesk

Helping search engines navigate your javascript menus

File permissions and CityDesk

Forwarding of old URLs when article renamed or moved, by redirect or mod_alias or mod_rewite

A very brief note on managing sections of a page

How to next forEach's to avoid infinite loops

Multilingual Web Sites with links to pages in different languages: How to place a link on every page that points to the same article in the other language. Create separate publish locations (similar to separate location for printable pages) for each language.

The Fog Creek (and CityDesk) Tech Support E-mail Form is here.

"The form goes right into our tech support queue with the highest priority." - Joel Spolsky


Preview workaound if your page is htm rather than html.

Use a foreach "this article" and "else" to highlight a menu link and maybe much more. Thanks to Jørgen

Can you "include" a magic name? (no but you don't really need to)

Using "x.variable" verses using plain ".variable" in a script (long discussion to get to the answer)

Creating an article and folder of the same name (is a problem / feature)

A beta of the German-language help file (die deutsche Hilfe-Datei) to CityDesk 2 is now available

Importing HTML, MS Word as articles (this has been covered before)

Huge sites, slow performance, long publish times

How to count the number of articles selected in a foreach loop (with a tiny bit of JavaScript)

How can I remove the MetaTag which states the site was generated by CityDesk (Do it with and external program)

Citydesk best use practices?

Users assume that the article name IS the headline and the bahavior is not always obvious includes comments from Joel

Citydesk adds a margin-left or margin-right style to the image, overriding my margin settings

CityDesk allows you to copy and paste articles

Third party programs folks use with CityDesk The links are in the discussion topic but I'll list them here for the search: HTMLDbScript, My Personal Programmer, BatchRun, Zoom Search Engine, Arles Image Web Page Creator, Site Publisher. Thanks to Simon Ghosh.

Count number of foreach matches? 

Download: a photo gallery slide show if you can do PHP Here is the download page: CityDesk Gallery Maker Thanks to Roberto

How to get unique id for each article to insert that into some Javascript (for a comment service for example)

Caption feature for pictures in CityDesk 2.0

How to let two non-Admin XP users edit CityDesk?

Setting color for link to active page in a for Each loop

Has anyone successfully used Perl to manipulate a CityDesk file?

Photo Album

CityDesk has a few problems when you try to use it at 640x480

I need to "repair" a few .cty files

I'm changing my site to html_dbscript version 1.5, so that I can store my content in an Access mdb, and so I can create html file dynamically

Here is the HTML DBScript download.

Get citydesk files from one .cty to another

How long does it take to publish 200 articles?

Tip: Using variables in Keywords field. I wanted to recreate an effect that I often see on Movable Type websites: hyperlink reference in the article itself to the categories to which it's assigned

Program for adding the results of database queries to .html files. It processes the files before they are published so that the .html is still static.  It's available for free.

Several database questions about CityDesk in one batch, the .cty file (access and jet)

Include an article in a template where this included article contains a body tag, but I don't want the article published on its own

Beautiful menu done in CSS without Javascript

Two column layout - good css sites

Unicode UTF-8 blues - it doesn't please everyone

Pasting from MS Word - long, brutal discussion about the problems

John Conner's "Captioned Image Creator" download

Managing printer versions with CSS

Getting RSS to work

Using Emacs as external editor

There are four kinds of dates in CityDesk V2

Recursive Table of Contents Generation using ASP

Using a batch file for running post publish process

Running CD on a Mac? yes

Keyword Picker for CityDesk  Here is the download page.

Tracking clickthroughs in CityDesk no specific to CityDesk but done in a CityDesk site.

How to Create Breadcrumbs included a .cty download from FogCreek

CityDesk Template Downloads from Telepark

Show first X articles with nonblank Y field? Use keywords

Highlight current selection in navigation

More on doing breadcurmb navigation

Paragraphs and "body" tag and ways to manage wrap, I don't understand this but John C. has a great idea and Joel comments on how CityDesk manages single paragraph "body's"

Multilingual design issue... duplicate images for each language

I have a chunk of code that displays a sidebar, but I only want it to display if there is something in the sidebar field.

Downloads:  Doing HTML Help With CityDesk Template.   Here is the article that you should read first.

Post-it trick with a stylesheet for extra paragraph and character styles (see Joel's post)

How do you use variables? a breathtaking list of ways to use them and suggestions for CityDesk

Moving templates from one .cty file to another

British Spelling Dictionaries. Download a ZIP file containing the British dictionaries for the CityDesk spell checker.

RTidy A Ruby script for running Tidy on a locally published version of the website. It requires some configuration, so if you decide to try this -- PLEASE read the help file.

Download for managing previous / next article functionality using a bit of php scripting

Tips for managing variables

Replace an existing image without breaking links

Turn a CityDesk site into a book; how to put your content into Word et al.

CityDesk Import-Tool for download

How to plug in content from other web app's such as free blog templates

Embedding Javascipt in CityDesk

Can I do this redirect? and  Redirect javascript

ifAny and ifNotAny? Can you nest CityScript?

Simple search facility

Site import utility from Telepark

Stopping very long strings i.e. no spaces in them from "deforming" tables and other HTML elements 

Tip: Detecting Broken External Links

Opening CityDesk with MS Access - Permissions

Can I do server side includes?

Can your put escape & characters in headline

How to make HTML view the default for articles

Transferring MS Word headings to CityDesk and dealing with tag laden pastes from Word

A nice list of feature requests summarizes a lot of individual postings.

PHP discussion forum for CityDesk by John is very much like the FogCreek forums

Using a domain just for forwarding purposes

Making a "hidden" article you'd rather not share with the entire world

Adding Navigation Buttons download and howto comes from this discussion topic

Don't lose a table

Messy tag buildup in extra fields

Importing troubles and solutions and dealing with images

Color bug and caution about normal view

Double byte chars - multi lingual sites

Where are articles in the CityDesk data base?

Problems with pictures

CityDesk FileBackup program John wrote (discuss topic) here is the download.

Magic names explained a little

Sam writes about building a site

Make a PDF file from you CityDesk site.  I don't understand it but it's slick.

CityDesk 'Edit with' (How to change the "edit with button selection in Internet Explorer)

Publish via command line

Couldn't put file: "The server returned extended informaion"

Is there an easy way to make comments in CD?

A New (Pre-Processed) CD Site

Script: How to hide headline for certain articles?

What are the "cd:pos="5"" in CD automatic image insertion tags?

Download - [XHTML with CityDesk] RTidy/CityDesk Released

I have released the Ruby script for running Tidy on a locally published version of the website. It requires some configuration, so if you decide to try this -- PLEASE read the help file.

I've provided it as a Windows executable. Your preview program will need to have "-G %1" as the parameters to get the GUI output.

Feel free to email me if you have any questions.


Austin Ziegler
Thursday, October 31, 2002

Using CityDesk to set up the docs like a typical help file

Flaky screens sometimes

publishing blog archives in chunks

<!-- Published by ... -->  problems for XHML, it appears before doctype

ftp bug connecting to Geocities maybe sometimes

Heading tags - why there not in the CityDesk editor

Using $.teaser$ in xml

Multiple CSS Styles Within Article

Which pages have been changed?

Moving files and folders around in the main window

Flaky screens

 A scripting tag that will return the number of articles like..  {$ getcount (condition) $}

Citydesk and NT4 permissions troubles

Web log templage from CityDesk

Bill's CityDesk downloads:

  • CityDesk Keyword Link Generator Script
  • CityDesk "Float" Utility
  • CityDesk DB API
  • CityDesk "Float" Utility (setup without DLL)
  • There may be some more by the time you read this.

You'd better read this too from the forum and in CityDesk News.

A Weblog Template With Comments by John.  You'll need PHP and MySQL but even I was able to make it work.

Solution: CityDesk can't open a file -its corrupt

Dead simple weblog template from John

Download for a stylesheet swicthing CityDesk site from Fog Creek.  Here is the CityDesk news article about it.

Foreach-ing thru a list of images (kind of)

Joel explains the three (article) publishing options and what CityDesk really does.  It answers the question: Publish which files?

Job Posting .cty download from FogCreek and a little bit about it from CityDesk News

Group related items together in boxes on web pages

Download a copy of the CityDesk site Fog Creek uses to generate all their help files (705KB Zip).  Here are a few paragraphs about it in CityDesk News.

How to update Images in the least painful way.

Pasting from MS Word and Excel causing problems due to extra formatting code

Control over background color, particularly in Extra fields ("Yep, turning off the 'use windows colors' option in IE seems to cure the problem." )

A free calendar month widget for CityDesk by John

The built-in editor in CityDesk is not going to do a very good job of editing files with PHP code embedded. I suggest using the File Types dialog to change the file type for php to use a text editor instead of the built in editor. -Joel

Free: CD Site Change notification utility from Patrick.  "Developed for our internal use we would like to share 'Notifier 1.0' with you fellow CD users. A utility for automatic email notification on changes to CityDesk-managed websites. Connects to your FTP server (of your website), retrieves the citydesk.xml file, checks differences to the last version retrieved, sends emails to recipients with information on changes that occured."

Unicode,  UTF-8,  Languages, and date formats

Download of a Non Profit CityDesk Template: NonProfit.cty by Darren

CityDesk article header "<!-- Published by Fog Creek Software CityDesk nnnnnnnnnnnnnnnn5/nnn -->" interfering with PHP and what can be done about it.

More FTP help - which directory to specify but this may be the best tip yet.

More on Navigating with Java script.  The Java script that allows you to generate breadcrumb type links.  .cty Download - Using Java script to manage navigation a zip file  (this is the new July 7, 2002 file)- The archive contains the naviation system (in top of each page with links to folders higher up) and some dynamic form. I guess good use of foreach. I've quickly translated it to English. Hope it is useful. Best regards, Adriaan van den Brand.

Access Citydesk data via MS Access (OLE blob's and some code)

Managing code fragments.  Daren explains his method for working around the practically unusable Variable editor to manage little fragments of content that are reused around his site.

citydesk.xml is a potential security problem and you can't rename it (yet)

Two way to prevent or manage link rot

Import problems and issues it's easy to import web pages one at a time.  If you drag files, folders or whole webs into CityDesk, you won't get magic names for internal links or images and you can see you images in the CityDesk editors.  Let's hope this gets better.

BUG: Crash if unbalanced {}  This is the first thing to check if you crash during a publish or preview.

.cty Download - Using Java script to manage navigation a zip file - The archive contains the naviation system (in top of each page with links to folders higher up) and some dynamic form. I guess good use of foreach. I've quickly translated it to English. Hope it is useful. Best regards, Adriaan van den Brand

How the "Valley of the Geeks" online newsletter works

Best multi lingual (multi-lingual, multilingual) site tip yet

Where am I (breadcrumb) navigation using CityScript and javascipt this one may help too.

Dealing with Proxy Servers

How to distrubutes templates on a LAN

Nice trick for editing variables (use a script in a variable to pull content from and article).

Images as backgrounds, using extra fields to manage the backgroung for individual articles.  Here is another related forum item: Page Background, color/image possiable? (the answer is yes)

Naming your articles fogxxx.  How to keep your original fog urls and keeping search engines apprised.

Publishing quotation marks and bugs

Publish Problems -  FTP and publishing a site from two PC's

Template Families problem, printable versions and languages

Problems when copying from MS Word and ways to deal with them

Managing <base href=""> tags

Using Javascript and variables.  I don't understand this yet.  Here is the discussion.  And here is Stu's .cty download.

Brian's picture gallery templates  not exactly a download but nice anyway

Managing a photo site or picture gallery

Download and documentation for an employee masterfile excellent, thanks to Richard

Publish just DELETED files and managing duplicated file and folder names and a little more about deleting empty folders.

Managing multilingual variables

Turn passive mode off when publishing to Tripod.

CityDesk Add-on Utility from Mike and his documentation.

Any ideas for how to do a weekly calendar view?

Nested "Foreach" loops need different variable names e.g. foreach x, foreach y, foreach z

Service Pack 1 improves on multlingual publishing

Integrating and Message Board into CityDesk

Another tip on Using CityDesk with a source control system

Dealing with and uses for audiences and how to use a global index.html to manage audiences even if you don't use the audience feature.  Confused?  Read on.

Server side Includes - how to get magic names to work and how the workaround may cause a broken link in an external editor  and more on Server side includes.

How the Fog### URL's will change in Service Pack 1

How do I "print this article"?  There is another item about "printable" versions but I can't find it.

Creating links to CD pages in Word and other external programs and worring about the path

Handling Perl's foreach without confusing CityDesk. (even if it may confuse you)

One way of handling Web Forms with CD

BUG: CityDesk uploads every file, even files that haven't changed

View your CityDesk database (the .cty files) with Excel

Download from Product Muse

Keep Track of your Keywords publish dates and other stuff in this article table

The problem with single paragraph articles and how to manage it

Version control / configuration managementcontrol for folks who are really serious about version control and configuration managment

Development methods from Kevin and .cty download

Tip: multilingual variable workaround

Whole bunch of scripts and more by Eric

An example legal office .cty file that you download by Eric

How to replace an external file while keeping the same FOG url / magic name

How to add tagets to links - links that open new windows, this isn't popular with everyone but some folks need to do it.

Recovering a site that you didn't back up is do-able.  Keeping your original URL's takes a little effort.(back up your site right now so you never have to do this)

Add a discussion forum to your CityDesk site

Jonathan Goodyear ( put together a demo CityDesk project that implements a discussion forum. It requires that your website support Active Server Pages (ASP), and supports both MSAccess and SQL Server to store the comment posts (installation instructions are included).

Mananging HTML in extra fields with variables

File extensions - how to create and use funky file extensions with "View-File types"

Can you put a script in a variable?  In a sidebar?  In a variable in a sidebar?

Pasting text from Word creates garbage characters and how to fix it

How to use "blank" templates to publish script examples in articles and prevent them from evaluating and causing errors  I don't think this title explains it very well, better read the topic yourself.

Can you add a hyperlink to the Author field?  This includes a link to an example .cty file you can download.  Did you know you can put a variable in the author field?

Maganging drafts that you are not ready to publish

Add a free site search to your site (it's easy, free, and works well)

CityDesk for Geeks by Joel Spolsky

Put keywords in your meta tags

Extra HTML junk showing up in your pages (it happens)

Problems publishing to Yahoo hosted sites and how to fix it

Renaming the index.html file and how to deal with it

Use a script to generate bookmarks

Use a script to build a table that maps filename to the "fog url"  That's not what this forum article is about but ...

How to use variables for your page titles

Non-breaking spaces - managing spaces and "nbsp"

Selecting words in the editor - including and excluding trailing spaces

Special punctuation - dashes, quotation marks etc.

Trick for looping in folders: using a script to put folder names in your menu

Use a template family to produce redirects when your site moves.

How to produce zip files of your site.

Versioning - a workaround that might work.

How to bullet links with a script?  (You have to insert the script in HTML view.)

How "deep" can you have variables before CityDesk stops evaluating them.

Use a style sheet to put a border around a picture from an "extra" field on a real estate site.

How to generate .shtml files from CityDesk.

Link problems in single spaced links, links too easily deleted, etc.

You can Insert->Picture to import a picture from the web.

Recapping how to avoid and debug scripting errors

Trouble finding script errors: a Pearl code fragment has script like code and CityDesk takes it for script and generates an error.

Generate Word and PDF documents for download putting CityScripts into a word document saved as HTML

Does CityDesk support dual monitors? (not yet  but maybe)

Making existing or imported HTML pages into articles and using tables in articles requires some work.

Managing images in scripts and putting images in "Teaser" and other extra fields. As in pictures for a real estate site(Yes, you can.)  There is even a example .cty file of a real estate site you can down load.  Here is the download.  And here is how came out and the discussion about how Deb did it.

Dealing with really big files such as AVI's.  CityDesk doesn't manage them well right now, best to keep them out of CityDesk and keep them on your server.

Managing articles with multiple authors so that the you can "see Maury's last 5 articles and Nat's last 5. Of course many of the articles are co-authored by Maury and Nat."

A process and a little script to manage versioning of frequently revised articles.  Versioning is probably an overstatement in this case but this contains a good idea.  Here is a another solution.

Where does "TimeFiled" come from and can you change it?

CityDesk can output whatever you want - xml, asp, txt, html.

Articles vs. HTML not a long discussion but covers a lot of ground about stretching scripts and templates to manage not only articles but folders and HTML files.

Can your put a space between the "{$ $}" in a variable?

Yes, using Alt-Tab to switch programs can drive you nuts with CityDesk.

Avoiding link-rot when moving a site to CityDesk (given the FOG urls), scroll towards the bottom of the page to find the link-rot workaround.

Using CityDesk's underlying database and generating non-HTML files with script.

Tables verses style sheets.  I don't understand the question or answer but there seems to be a great truth here.

How does CityDesk count pages? (Starter Edition vs. Home Edition vs. Professional Edition)

How to word wrap in HTML view. (On the menu, choose View >> Word Wrap.)

Handling special characters such as "&ndash; &#8212; and &#8211;  You'll probably understand this better than I do.

A way to generate a weblog-style archive page, where you have months listed which link to a page including the posts from that specific month and Joel shows us some scripts.

You can resize the variable window.

To do a site wide search: Use the big magnifying glass in the main window.

Gil explains the problem with renaming a file to "index.html"  "I then deleted the original Index.html, renamed Index_2 to Index and generated my new site. Much to my suprise, nothing worked!"

Link to external style sheet using CityDesk "Copy Magic Name"

Handling Email links the very easy way and the easy way

Do articles keep the same filename each time you publish, even if you move a file to a different folder?  (yes, if you don't move them; no, if you do)

Importing/Converting a FrontPage site  the hard way and the easy way

A script that manages a subfolder and articles that DON'T have a particular keyword.

Can you put CityScript into an article, an "extra field" or a template?

Problem with articles and folders having same name and a way to deal with it

Using variables and or to handle templating for HTML files

Using Ctrl-A to "select-all" in articles, teaser, sidebar, about and extra fields

Use Ctrl-S to save without closing

Adding an external (verses an internal) link on an image

Can you use CityDesk for ASP or

Can you change the CityDesk generated article URL's? (short answer is no)

This is a script Joel used to manage his month by month article archive for Joel On Software.

An example of a script with an error and how to fix it.

Structure of a Real Estate site: Use audiences? kewords? template families?

Inserting external links

Multiple Language issues  and Why can't we have multiple languages for pages?

Is replication in the future for team members who aren't on the same network? (short answer: Yes)

Why did  Fog Creek design CityScript that way and will City Desk allow pluggable scripting engines?

Joel's series "Working on CityDesk."  This is Article 1, there are links at the bottom to the rest of the aticles.

Is replication in the future for team members who aren't on the same network? (short answer: Yes)



Back to Top