Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Having a central index.html when using Audiences

CityDesk publishes a complete web site for each audience in a specific folder named after the audience. CityDesk also publishes a simple index.html in the root saying which versions it published in which folders plus a link to the respective index.html files.

Here comes the problem: I would like to have an index.html in the root explaining to visitors what versions exist and how they differ, so he/she can chosse which version to visit.
But this seems not to been foreseen, unless I'm missing something.

I could create an index.html for the root separately, even with another tool, but this file gets overwritten each time you publish with CityDesk. Yes, you can selectively publish each audience without creating that index.html in the root, but I anticipate having 6 audiences, so would much prefer the publishing in 1 sweep.

Am I missing how to create that central index.html? Has anybody any experience with this or suggestions? Thanks!

Paul Iliano
Tuesday, February 26, 2002

This is exactly what I'm using CityDesk for, but I'm not using audience for it, and I think this is where CityDesk's real power comes into play.

I'm creating a "global" index.html, and then creating seperate pages. I work in a bank, and the bank is worldwide. Our audiences are "Banker in the US" "Banker in Europe" "Product Specialist in Asia" "Support Staff in Latin America."

Each of the pages contains the same basic information, but different versions of it. The US banker page will have something like:

{$foreach x in (and (keyword_contains "banker") (keyword_contains "us")) $}

My folder structure might be like:

/index.html
/bankerus.html
/bankerasia.html

etc. Each similar to the last, but with different conditions for the loops. They all have access to all the content, but by creating a homepage for each, I've customized  the view to them, and I still have to add cotnent only once. A presidential announcement has to go to all, and I can do that. A new product might be applicable to both the US and Europe, and I can do that.

/index.html might have a high level view of all the news, and it will link to all of the other customized pages (or actually we're going to have a "customize your page" link, and write their selection to a cookie so it automatically directs them to the right page.

Does this make any sense? I think someone needs to write a tutorial on how to do this... Maybe I'll do it in my spare time and upload it to my website.

Mark W
Tuesday, February 26, 2002

Yes, it makes sense. It's an ingenious and flexible way. Just to be sure I understand correctly: you control which article shows up for which audience by using the proper keywords, like 'banker' and 'europe', or 'support' and 'asia', or other combinations, right?

What made you decide not to use the built-in Audience feature - you needed more flexibility? Or you couldn't find a way to create and maintain that global index.html (as I am)?

As I said, theway you implemented audiences is ingenious and flexible, and I'm not saying I won't consider it, but how could I get a global index.html using the standard CityDesk Audience feature?

Paul Iliano
Wednesday, February 27, 2002

I chose not to use the standard CityDesk audience feature because:

1. you have to choose an audience per location, and the entire site will be sent to each directory, wasting hard drive space, and increasing maintenance.

2. You can't really cross-link between audiences. Once I set something up for "Europe Banker" he's the only one that can see it. Even if "Europe Support" needs to see it too. With Audience it's an all or nothing deal - I'd have to enter an article twice for it to appear in two places.

Mark W
Wednesday, February 27, 2002

Yes, apart from having no global index.html, the other pain in the neck with Audiences is you cannot link from an article in Audience A to an article for Audience B.

The more I think about it, the more I see the advantages of your way to implement audiences.

You said something about writing a tutorial and putting it online... that would be very worthwhile ... let me know if you do.

Paul Iliano
Wednesday, February 27, 2002

It's probably very confusing, which may be worse than nothing, but I'm hoping it's both clear and better than nothing:

http://www.marktaw.com/design/CityDesk/fog0000000030.htm

Mark W
Wednesday, February 27, 2002

Great article, Mark, thanks!

If you really want to use audiences, though, you can publish one level deeper. That is:

http://blah.com/index.html -> your top level file, put there manually, which points to each audience
http://blah.com/x -> this is where CityDesk publishes, creating an index.html which nobody cares about
http://blah.com/x/audience1
http://blah.com/x/audience2
http://blah.com/x/audience3 etc -> CityDesk makes a folder for each audience

Joel Spolsky
Wednesday, February 27, 2002

I had thought of that, but sometimes when you're teaching, showing someone *every* possibility is a big no no. They need to learn a way to do it before they can grasp every way.

Besides, what's the point of publishing everything to subdirectories when what audience does is restrict what you can see? My logic is as follows.

1. If you have a mechanism to restrict access it should be used in ways that will exploit that.
2. Audience restricts who can see what.
3. Published to subdirectories, everyone can see any content unless you jump through hoops to change directory permissions or shares or whatever.
4. Therefore, you should use audience to publish to different sites that at least one of the audiences can't see.

Also, audience duplicates all the data - an ineffecient use of server space. Why not create seperate views of the information on various index pages, but leave the bulk of the data in one place? Our site is pushing 8 gb, I would only want to publish information once.

In my mind Audience is best used for creating publishing *different* sites with overlapping data. Also, the coupling of audience with template makes it powerful for publishing different sites.

For example, you could create a seperately branded consulting site, and publish to FogCreek.com, Joel on Software.com and ConsultingSite.com all from the same .cty file. Nobody would need to know that they were all the same company, and since they look different and have unique information in each, it would be really convincing. On the other hand, some stuff would go to all of the sites (thus warranting having it all in the same .cty file to begin with). The result?

* three seperately branded sites
* all with unique data
* enough overlap to justify publishing from one source

So yes, your method is certainly a possibility, but the end result should be "some people can only see their site and not another." The one exception would be management, who would want high level summaries and should be able to, but shouldn't be forced to, see everything anyone else sees. Was it in Designing Web Usability that Jakob Neilsen warns against havina a homepage that has a button for every VP?

I think you should be able to multiple select audiences for articles though.

audience1
audience2
audience3
audience4

"This aticles goes to audiences 1 and 3 but not 2 or 4." Probably a fringe need (four audiences?), but it makes sense to have it.

Mark W
Thursday, February 28, 2002

Mark, thanks for your very enlightening article.

Joel, thanks for your tip on how to have a global index.html.
It's a bit awkward to have this /X folder, isn't it. In addition, sooner or later people will go up a folder from their audience folder and end up seeing that /X/index.html created by CityDesk.
But ... it would work fine in terms of having a global index.html

Paul Iliano
Thursday, February 28, 2002

Mark knows more than Jo-el, na na na na na na!

Joking Person
Thursday, February 28, 2002

I've revised my tutorial, simplifying it and adding two example pages. Two homepages for my site, one for musicians and one for designers.

I didn't put a lot of work into the example sites (no links to archives, etc.) but they show what can be done. Just imagine that you visit the normal homepage of my site, and there are links to each of these homepages. "click here if you're a musician" and "click here if you're a designer."

One becomes the central index with an overview of the site, the others become index pages for different audiences.

Mark W
Saturday, March 02, 2002

*  Recent Topics

*  Fog Creek Home