I would like a print version page ie no header, no footer, no layout
I want the category page on plain white paper without header, footer, layout
How do I get the category page without the attached layout.tpl please?
It is for a price list
Thank-you
Here's a little article that might help.
http://www.devarticles.com/c/a/PHP/Use- ... f-Files/1/
http://www.devarticles.com/c/a/PHP/Use- ... f-Files/1/
Brent
You don't really need any of that, it can all be done using CSS...
http://www.alistapart.com/articles/goingtoprint/
Once you made your print.css, the only change you need in your layout.tpl is you need to add this line into the heading:
If you manage to make a decent print.css, I may include this into the core.
Note: you can use "display:none" in the PHP to prevent areas you don't want from showing, such as header/footer/sidebar etc.
http://www.alistapart.com/articles/goingtoprint/
Once you made your print.css, the only change you need in your layout.tpl is you need to add this line into the heading:
Code: Select all
<link rel="stylesheet" type="text/css" media="print" href="print.css">
Note: you can use "display:none" in the PHP to prevent areas you don't want from showing, such as header/footer/sidebar etc.
Last edited by hm2k on Fri Nov 14, 2008 2:58 am, edited 1 time in total.
I'm missing something here.
I understand that I need to do a print.css and link to it in the layout.tpl
But what I don't understand is how do I tell open cart when to use the default.css and when to use the print.css. Otherwise, Open Cart will hide my eg menu on "normal" category pages.
Do I have to make a copy of layout.tpl and use that for my price list so it doesn't muck up my normal layout.tpl ?
I understand that I need to do a print.css and link to it in the layout.tpl
But what I don't understand is how do I tell open cart when to use the default.css and when to use the print.css. Otherwise, Open Cart will hide my eg menu on "normal" category pages.
Do I have to make a copy of layout.tpl and use that for my price list so it doesn't muck up my normal layout.tpl ?
That is handled by that line hm2k gave:
Browsers know that when you click "print" on a webpage, that it needs to load that file when printing
Code: Select all
<link rel="stylesheet" type="text/css" media="print" href="print.css">
See where it says as opposed to the normal
Code: Select all
media="print"
Code: Select all
media="screen"
Who is online
Users browsing this forum: No registered users and 38 guests