One of the most forgotten or ignored "features" of a website is the print page. Many times a print page is not even considered to be part of building a web-site and in that case it is up to the designer or front-end developers mood to create printer friendly pages or not
Not is probably the most common answer because it takes time and it's simply not part of the scope of the project while in realty it should be.
First of all I want to point out that I try to avoid using a print icon or something like that in the template, printing is a browser functionality and not a feature in a website.
The start of your print page design adventure is adding a print css file to your Joomla! template css directory which you can simply call "print.css".
To hook up that file with your template you'll need to open your template "index.php" file and find the following line:
<jdoc:include type="head" />
That piece of code is what renders Joomla! meta data and javascript and css files. Below that line you need to add the following html:
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/print.css" type="text/css" media="Print" />
Now once that file is created and the line is added to the head section of your template you can start crafting your print page css.
Things like; read more links, last 5 forum posts, large header images, ads or other clickable items are not really useful when you are reading the content on a piece of paper. That's why we are going to hide everything that doesn't need to be printed.
You can do two things, look for what you want to hide in your template file or just do a view source in your browser. I usually start with the template file to hide the large chunks and after that I start looking in the source for things like; read more links which are rendered by the CMS itself.
In the css file you just start adding classes and id's to a list that is set to display none. Make sure you leave your content container untouched to keep it visible.
#nav-container,
#promo-container,
#middle-sidebar,
#right-sidebar,
#more-container,
p.read-more,
div.items-pagination,
div.items-links,
div.after-content-events {
display: none;
}
You can test what is happening in your browser by using the print preview function.
When you are at the point where you only have the content left that you would like to show on print you can start adding some css to the print.css file to make it look a little more beautiful, there are limits but you can add some eye candy.
Now, one of the reasons why you should create print pages is my dad. He is one of those old school guys that prints pages from the internet to read instead of reading on screen and there are probably more oldies like him that do the same :-)
# 2 - Posted by: Karen Lehrer on 2009-06-10 13:48:31
I have made a print.css for a Joomla 1.5 site that works if you print the page using either a keyboard short cut or by "file/print" from the browser. The print.css is not taken into account however if I print using the print icon in the page. How would I be able to bridge the use of the print icon so that the css is taken into account?
# 3 - Posted by: Arpit on 2009-06-20 06:15:00
Hi,
Can we make it reverse..?
My print content is too small.
Can i go like this:
choose those id's to print out only.
Reverse from choosing id's to leave the content.
Thanks,
Arpit
# 4 - Posted by: 11x17 printer review on 2009-12-07 13:59:28
Thanks for sharing. I've been looking for this so long.
# 5 - Posted by: handoyo on 2010-03-19 02:25:11
prev testt hehehe
# 6 - Posted by: teste on 2010-03-29 16:24:12
asdfasdfasdfasdfa
as
dfas
f
as
df
# 7 - Posted by: Christian Louboutin Sandals on 2010-04-15 07:35:30
I have made a print.css for a Joomla 1.5 site that works if you print the page using either a keyboard short cut or by "file/print" from the browser. The print.css is not taken into account however if I print using the print icon in the page. How would I be able to bridge the use of the print icon so that the css is taken into account?
# 8 - Posted by: christian boots on 2010-04-15 07:36:21
I just did this on my site after reading this little tut and it works great. I had completely forgotten that the print view in Joomla! isn't very pretty by default, so thanks a lot for the reminder!
# 9 - Posted by: bbn on 2010-04-28 05:43:38
cheap nike shox r4
fendi sandals
women shox shoes
cheap nike shox nz
# 10 - Posted by: gh on 2010-04-28 05:44:09
cheap nike shox r4
fendi sandals
women shox shoes
cheap nike shox nz
# 11 - Posted by: Tim on 2010-06-02 22:51:22
Thanks, very usefull.
Is there an option to show some header image in print only version? How can i do it?
# 13 - Posted by: Stanley on 2010-06-23 20:57:33
I'm trying to do this same thing on my website. However I want to simply create a print button on the main page having it just print the relevant data off the website and not utilize the flyer section of Joomla. Any ideas on the coding and where the best place would be to insert the coding? Any help would be appreciated! :)
# 14 - Posted by: Nike Air Rift on 2010-06-26 02:43:06
Like your website quite a lot, not simply due to the fact with the articles and other content, however the view of you on the society. Thank you for sharing.
# 15 - Posted by: air jordan 11 on 2010-07-01 06:53:53
Hhe article's content rich variety which make us move for our mood after reading this article. surprise, here you will find what you want! Recently, I found some wedsites which commodity is colorful of fashion. Such as that worth you to see. Believe me these websites won’t let you down.
# 16 - Posted by: aaa designer handbags on 2010-07-02 09:19:46
nice very helpful tips.
thanks for sharing.
# 17 - Posted by: louis vuitton speedy bag on 2010-07-02 09:20:25
http://www.louisvuittonbagmall.com/ louis vuitton bag
# 18 - Posted by: wholesale nike shoes on 2010-07-03 03:56:43
it sounds great .Join us to start sharing your reviews, news about sport shoes in kickshere.com
# 19 - Posted by: jordan shoes for sale on 2010-07-03 03:57:54
it sounds great .Join us to start sharing your reviews, news about sport shoes in footworkwarehouse.com
# 20 - Posted by: ugg boots on 2010-07-05 01:36:31
It looks good,I have learn a recruit!Recently,I found an excellent online store, the XX are completely various, good quality and cheap price,prada accessories it’s worth buying!
# 21 - Posted by: ugg boots on 2010-07-06 09:29:22
Wow,good!
I love what you wrote.
I think we can make friends.
# 22 - Posted by: ugg boots on 2010-07-06 09:32:59
Wow,good!
I love what you wrote.
I think we can make friends.
# 23 - Posted by: swiss replica watches on 2010-07-09 02:01:57
i believe you are a good writer, but have you erver thought to write some special artcals for peopel who likes shopping very much.
# 24 - Posted by: designer handbags on 2010-07-09 06:47:31
Very nice post. I really enjoy the reading.Thanks
# 25 - Posted by: nike air max on 2010-07-16 07:09:58
It looks good,I have learn a recruit!Recently,I found an excellent online store, the XX are completely various, good quality and cheap price,nike air max shoes it’s worth buying!
# 26 - Posted by: nike air max on 2010-07-16 07:10:50
It looks good,I have learn a recruit!Recently,I found an excellent online store, the XX are completely various, good quality and cheap price,[url=http://www.nikemaxsale.com]nike
air max shoes[/url] it's worth buying!
# 27 - Posted by: NFL Jerseys on 2010-07-18 18:35:26
hey,you have posted such a effectful article that it will certainly help me.
# 28 - Posted by: milgauss_rolex-watches on 2010-07-24 03:41:07
Milgauss replica watches,http://www.watcheslux.com/milgauss_rolex-watches.html
# 29 - Posted by: Air Jordan 6 on 2010-07-24 07:17:42
Thanks for sharing. I've been looking for this so long.
# 30 - Posted by: replica watches on 2010-07-27 02:25:45
Thanks for the insight! There is a lot of helpful information within those links http://www.watcheslux.com/datejust_rolex-watches.html
# 31 - Posted by: karte wow on 2010-07-27 07:27:25
welcome to gamesavor to buy wow gold!
# 32 - Posted by: ed hardy on 2010-07-28 09:38:40
Forever 21, the US clothes retailer popular for selling fashion-forward clothing at low prices, has courted controversy by expanding into maternity wear. The brand, loved by youngsters and teenagers, has launched Love 21, a range of cheap and stylish maternity clothing including jeans for as little as US $8.
ed hardy
[url=http://www.ed-hardy.cc/ed-hardy-clothing.html]ed hardy clothing[/url]
http://www.ed-hardy.cc/ed-hardy-caps.html ed hardy hat
Help for creating beautiful comments.
Please read this help text and use it when you post a comment.
You can use the following html in your comment:This is the first paragraph of your comment
This is the second paragraph of your comment and this text will be bold.
This is the third paragraph of your comment and this text will be italic.
Thanks
In Joomla! land there are a couple of ways to built your website and I'm talking about the template specifically. Now...
One of the most forgotten or ignored "features" of a website is the print page. Many times...
The Joomla Project is pleased to announce the immediate availability of Joomla 1.5.7 [Wovusani]. This...
As you may know already there is an option in Joomla! 1.5 to create one menu tree but show different...
For professional Joomla! consultancy and development visit Alvaana.com
Copyright 2008 The Woof and The Warp - Arno Zijlstra
Re: It works after all!
# 1 - Posted by: AnotherGuy on 2008-09-11 03:04:31
I just did this on my site after reading this little tut and it works great. I had completely forgotten that the print view in Joomla! isn't very pretty by default, so thanks a lot for the reminder!
I'm still tweaking it a bit, but it works now and that matters more than anything.