Best way to make printer friendly pages?

J

Jeremy

I would like to make printer friendly pages for all the pages in my site.
All my site's pages are linked to a .dwt template. I would like the printer
friendly page to print only what I have in the Body of each page, and not
the header and left borders provided by the template.

The best way I have come up with so far is: Make a "new printer friendly
page" with just the Body material in it, then replace the Body material of
the original (.dwt linked) page with an Include to the new printer friendly
page. This would enable me to keep only one copy of each page, which is
important since the pages get updated and I don't want to have to update
both the main and printer friendly pages. The disadvantage is that it will
be quite a bit of work to do this for all my pages.

Is there a better way?

For instance, is there a way script, that when invoked, would automatically
present a new page with just the Body material in it?

Many thanks in advance! Jeremy
 
P

P C

I have played around with this, too. But have done anything yet.

But first what is .dtw?

I thought if two ways

1. First option

Your actual content for each HTML based page is actually in a database.
When a browser calls a particular page, the page will be generated on
the fly by putting together the stylesheet, borders, ads, banners etc
plus the content based on a standard layout for the page or based on few
few standard layouts.

Then when someone clicks on a link for a printer friendly page, the
sever generate a printer friendly layout and the content.

For this option, you need a very good back end database. If you already
have your web in several hundreds of pages, you will need to convert the
pages to database based content.

2. Second option

Use two styleshets. One for screen and one for printing. In the print
stylesheet define an element "noprint" and set the text to hide (display
none.

In your web page, enclose section you don't want to print between DIV
tags with class=noprint. For example.

some stuff i want to print
<div class=noprint>
some stuff i don't want to print
</div>
some stuff i want to print

There are different ways of implementing this concept. Here's one example
http://www.maratz.com/blog/archives/2004/09/21/10-minutes-to-printer-friendly-page/

Do a NET search for other examples.

Of course you need to fine tune this and develop a good page layout. And
then apply it consistently to all pages.

3. Other possibilities?

Post pack to let us know what you decde

Cheers
....PC

....PC
 
J

Jeremy

Thanks PC and Murray.

I decided to put my body content into a print friendly page with its own
..css and use an include to copy the content into my main pages. I use hidden
style to hide things that I don't want in the main page, and the print
friendly page. That way I only have to maintain the print friendly pages,
and the main pages are updated by the include.

It turned out to be too hard to tag all the bits of the main page that I
didn't want to print, then use the method at
http://www.maratz.com/blog/archives/2004/09/21/10-minutes-to-printer-friendly-page/
althought that is very elegant. I will use that method on the next site I
do. I have learned a lot about how to not over-complicate my pages...

Jeremy

PS. .DWT file is dymanic web template
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top