Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

integration with dynamic pages

I'm consulting with a non-profit group that really needs City Desk's content management, but whose site will also need to provide dynamic pages like discussion threads, a login page, and a shopping cart. So I'm looking for general guidelines or tips on how to integrate pages produced with CityDesk into a dynamic ASP or servlet-driven site. Ideally I'd like to produce the top page of the site with CityDesk and just dive into the dynamic pages when necessary, but I'm open to suggestions.

Paul Bonner
Thursday, October 2, 2003

CityDesk has a neat feature where you can include the contents of a CityDesk article within another page's body

    {$ include "article" $}

If you can keep the page's ASP code all in one piece...

Strip the ASP code out to separate files in another folder, then have the articles that want to contain dynamic content use a template which has the relevant {$ include "article" $}

If your client could be trusted (-: to leave CityScript alone in the articles themselves then you don't need to use a separate template for dynamic pages.

Thursday, October 2, 2003

Two other approaches:

1.  Segregate the scripted pages and the CD pages, if you plan to create a bunch of static pages, too.

2. Use the HTML file to store your code.  You can use CD variables and  Magic File names in the file.

I run a couple of ASP pages right now, calling an Access database. I keep a test copy of the database on my local server so I can view effects of the dynamic pages locally --  the CD Preview feature doesn't render them.

The HTML file in CD uses text coloring for html tags, so you probably want to do any serious coding in something else, and then copy the final into CD.

Thursday, October 2, 2003

You may already know, but you can create templates which will use the .asp extension.  Check the help file concerning templates.

I use asp in most of my sites.  Not a problem at all.  I'm developing a site with lots of photos now, and I think I will be using an access db and ftp the photos directly to the site since CityDesk file would be huge if I included the jpgs.  Its not a problem.

Specifically, what problems do you foresee?

BTW, several here have integrated PayPal into citydesk sites. 

Joel Goldstick
Friday, October 3, 2003

Thanks for the comments. The more I read about it the easier it sounds. I 'm going to go ahead and recommend CityDesk for content mangement. The ability to generate ASP pages from templates should solve any of the problems I was anticipating.

Paul Bonner
Friday, October 3, 2003


You mentioned integrating PayPal into a CityDesk site. I'm about to go down that path. The local community theatre I volunteer at wants to set up an online shop where payment is handled via PayPal.

What's involved?


David Watts
Friday, October 3, 2003

First, go to paypal and look at their developer info.  They have a couple of wizard like procedures to create the html code for a single item purchase and for a shopping cart system.

Cut and paste from that site onto your citydesk article pages.  When your user clicks the Paypal button, it sends form info to paypal.  There really isn't anything special in relation to citydesk you need to know.  I think an hour or two with the PayPal documentation will be all you need to get your first attempt up and running.

To see one of my examples check out and click on the books, tapes or video menu items on the right side.  Try it out -- in the end just cancel before you place your order.

Joel Goldstick
Saturday, October 4, 2003

I also created a CityDesk template that integrated with Paypal, it's not too hard. You can even stick the uniquely identifiable stuff in a variable and re-use the same template for a different site/product set.

Mark T A W .com
Monday, October 6, 2003

*  Recent Topics

*  Fog Creek Home