Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Warning about using multiple .cty files

We use a bunch of .cty files for our intranet and development. It's a great way to keep things organized, and can be a way of providing a level of permissioning -- certain groups can only access certain .cty files.

But a warning, learned the hard way!

Make sure each .cty file publishes to a different directory on your web server. My cohort and I have been wondering where are files have been going all day. We publish, and then they disappear. Of course, we're working on separate .cty files, and stupid me set them both to pubish to the same directory.

Wednesday, February 25, 2004

Yes I use the same "technique" and have stumbled across the same problem. The workaround is to delete the CD' generated XML file that sits in the publish root just before you publish.

Hans van Leth
Saturday, February 28, 2004

Is it possible to share templates between multiple .cty files when you do this? I want to do this but I can't see any way of avoiding maintaining more than one set of templates.

Monday, March 1, 2004

I don't think there's an easy way to share templates between CTY files. It's possible Access has some sort of external table concept, where you could map the templates table in one CTY file to point to the templates table in another. Anyone know for sure?

Anyway, I just view my templates in the text editor within CityDesk, and copy-n-paste any changes to other CTY files that use the same templates. It's quick enough, and I change them infrequently enough, that it isn't painful.

Darren Collins
Monday, March 1, 2004

I am nothing more than an average CityDesk user, but you got my curiosity going so I went ahead and tried it.  Preliminary tests make it seem like you can do this, but if you choose to repeat this you obviously do so at your own risk.  You may mess up your whole site.

Here's what I did:
1. Create a new site in CityDesk.  I saved mine as "test.cty".
2. Close CityDesk.
3. Open the new site (test.cty) in Access.
4. Rename tblTemplate, tblTemplateFamily, tblTemplateStructure, and tblTemplateStructureDefault.  I renamed them to xtblTemplate, xtblTemplateFamily, etc.).
5. Click the "New" button at the top of the table list.
6. In the New Table dialog box, select "Link Table" and click OK.
7. In the file selection dialog box, navigate to the .cty file containing the templates you'd like to use.  Note that since .cty is not an extension Access looks for, you'll need to enter *.cty in the box and hit enter before .cty files will show up.
8. Hold down the CTRL key and click on each of the tblTemplate... tables, and then click OK.
9. Close Access.

Now when you open the new site in CityDesk, you'll have access to the same templates as in the original file.  You can edit them with the new site open and have the changes show up in the old one, and vice versa.  This seems to be a neat trick to spread stuff out across multiple files.

Monday, March 1, 2004

It's cool that it works! I never bothered trying, since it wasn't a problem that bugged me enough :-).

Just be careful to keep all your .cty files in their current locations. Moving them around would probably break your links.

Darren Collins
Tuesday, March 2, 2004

*  Recent Topics

*  Fog Creek Home