Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Feature Request: Content Templates

I know this is probably unlikely, but it would be great if a future version of CD was able to define some kind of template structure for content that goes into the main article {$ .body $} of a web page.

For example, if you are publishing a catalog of objects, then the chances are that each page will be the same. It would be an advantage if the adminstrator could set up pre-defined page body templates that users could then edit with just the product details.

It is possible to store pre-defined html content by using the templates and cutting and pasting the code. (Templates are never published so they make great alternate storage - the down side is you have to be able to turn on design mode). I've found that creating "library" pages in a folder works fine too... except that even if you set the "do not publish" date, the folder will still get published.

Anyone got any better or other ideas about how to make page content templates?

Ashley Dennison
Friday, February 13, 2004

I may be missing something, but it sounds like you have just described the extra fields and css formatting. What you are saying is what CD already is.

If you want to do all the formatting in the body field, you can paste in from a template, but then you don't take advantage of CD's built in functionality.

Ron Lane
Friday, February 13, 2004

What I was trying to say is that I would like to be able to make "master" pages for the content that appears inside the "article" body of the document. Perhaps, I haven't described this very well.

Although CD allows you to put text into the extra boxes and through the use of it's templates you can control how the page is contructed, header at the top, menu on the side and so on.

What you don't have control over is the big box that users type into called "article". What I was asking for was a good way to make templates for the "article" box.

For example, if you want to create a page that holds information about something.. say a branch within your organisation, a picture or maybe a product for a store.. that information is structured, rather than freeform text, and every page may look similar.

Now, currently the only way to do this is to build the article page for the first item and then cut and paste it for each new page that follows the same format.

Sure, you can make a "blank" page that has all the formatting applied on dummy text, but then chances are that page could get accidently published.

What I was really eluding to was a dreamweaver/contribute style template maker for the article box. So that as the site designer, users have to enter information for each page in the same way rather than as the free form "hole" the article box represents.

Hope this explains what I mean better,
Ashley.

Ashley Dennison
Monday, February 16, 2004

I think maybe you're not fully realizing what you can do with CityDesk's articles.  With some creativity, they can do most of what you seem to be describing.

You mentioned the example of having several pages of information about branches in your organization, so I'm going to use that to explain how to get around the problem you seem to be having.

Let's say that we want a web page for each branch of the organization, and each one of those pages will have:
1. the name of that branch
2. a picture of the person in charge of the branch
3. the name of the person in charge of the branch
4. a description of what the branch does
5. a phone number to contact that branch of the organization
6. an e-mail address for the branch
7. recent news about the branch

Now we go to the templates screen, and make a new template called "BranchInfo".  Go to the properties for the BranchInfo template, and we'll put in the following values:
Headline: Name
Author: Supervisor
Teaser: Description
Sidebar: Supervisor Picture
About the Author: Recent News
Extra 1: Phone
Extra 2: E-Mail

Then save the template.  Now you have a "content template" that you can fill in with the details of a branch in your organization, and then you can either publish that as its own web page, or you can use the CityScript {$include$} directive to publish it inside another page.

That seems, to me, like what you're looking for.  If not, or if it doesn't make sense, please explain your problem further.

Kevin
Monday, February 16, 2004

Correction: the {$include$} directive will only include the .body field, and wouldn't include the whole "content template".  You'd actually need to use a {$foreach$} loop and specify all the fields you want included in the other article.

Kevin
Monday, February 16, 2004

Thanks Kevin,
I see where you are coming from now. Using the extra fields to hold structured content. That may well be adaptable to my purposes with a little rethink of how many "fields" I was going to use.

Ashley.

Ashley Dennison
Monday, February 23, 2004

*  Recent Topics

*  Fog Creek Home