Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

How do I "print this article"?

Has anyone built a "print this article" feature into a CityDesk site?  Basically clicking on "print" should bring up the same article with much of the screen "noise" (menus, etc) removed.  The obvious way to do this would be to reformat the article into another template but obviously I can't do that at runtime.  I'd love to hear about any ideas or actual implementations of something like this.

Thanks,
Ben

Ben Riga
Tuesday, February 12, 2002

I did this just recently for a site. I created a 2nd set of templates called "printable" that was essentially just a headline and body. Then every page on the normal site (via the template) had a "print this article" link that linked to something like:

/sitename/printable/{$.link$}

Where "printable" is the name of the template for printable articles. This depends on having a flat file structure with all of your articles in 1 folder.

This works because if you put {$.link$} in an article, it will "link to itself," or give you just the filename without any folder information.

Joel's promised to create an easier way to do this in a future release.

Mark W
Tuesday, February 12, 2002

hmmm.  I figured it would be something like that.  I was hoping there was a more elegant way.  My articles are in many different folders.  Oh, well.

Any word on when the next feature release is coming?

Ben Riga
Wednesday, February 13, 2002

You know, this might be handy too...

/sitename/printable/{$.linkWithoutExtension$}.xxx

Because then if you replace .xxx with .pdf one common task becomes a lot easier.

Maury Markowitz
Wednesday, February 13, 2002

This implies that the PDF will be named fogxxxxx.pdf.

I really don't see much use for this, the PDF version typically means that there is a Word, or Excel, or other original from which it was made. The Article, it seems, should surround the PDF (blurb text about this file, etc.) not duplicate it. An example would be IBM's tech support site:

http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF778525699600704415

So the file (in this case a PDF) has all sorts of information surrounding it - Properties and Extras and whatnot, even a body (there's a teaser on a previous index or search page, that's 1 or 2 lines), but the ultimate navigation goal is the PDF.

This is a very typical "Domino" (www.lotus.com) configuration - enter article headline, body, teaser, sunrise/sunset dates, attach file, etc.

Again, I run shop that's heavy on document repository sites, so it would be a real boon if I could add documents, put them in folders, attach keywords to them, teasers, etc. and have them turn up in loops, etc.

Mark W
Thursday, February 14, 2002

Upon submitting that last post I go a page whose only ouput was:

<BO

a bug in the discussion software, perhaps?

Mark W
Thursday, February 14, 2002

That's assuming that you allow CD to use it's own names for your articles...

Maury Markowitz
Thursday, February 14, 2002

I have done this on my site (the entire site, not just CityDesk). I use alternate CSS stylesheets, and auto-launch the print dialog, and then auto-dismiss the window when it's done printing (or cancelled).

I'm using ASP.net to parse the command line. You could do it in DHTML, as well (with perhaps slightly more limited success, for people who have disabled JavaScript).

http://www.quality.nu/dotnetguy/

Brad Wilson
Sunday, February 17, 2002

For this print technique to work, will you have to make a second copy of your article content?

S
Saturday, May 17, 2003

*  Recent Topics

*  Fog Creek Home