I am trying to edit alot of my web pages and change the link to a particular are. What I have is two folders with the exact same filenames in each folder.
Eg. I have a folder named "Rentals" and another folder named "RentalsPrintable". Each folder has the exact same files in them ("RentalsPrintable" files are modified to be printable versions of the "Rentals" pages).
The files in the "Rentals" folder are using php to include a common navbar. What I would like is a piece of php on the included navbar file that will pull the filename (minus the .php) from the page it is currently on so I do not have to modify each and every page.
Eg link. "/RentalsPrintable/+filename (minus the extension) + .html" Where "filename" is the php generated value.
I am not sure if this makes sense. Do you understand what I am looking for?
Just for the sake of it - have you considered having PHP "make" the pages printer-friendly, or even using a separate stylesheet for printing? (#nav { display: none })
I think it is overhead to have two "identical" pages for two different purposes... do that behind the scenes, or get stressed when you want to update and just forget to make the change to both...
Just for the sake of it - have you considered having PHP "make" the pages printer-friendly, or even using a separate stylesheet for printing? (#nav { display: none })
I think it is overhead to have two "identical" pages for two different purposes... do that behind the scenes, or get stressed when you want to update and just forget to make the change to both...
It sounds like a good idea, but that is way beyond my skills. I am very skilled in html, but my knowledge of php is shameful at best. On top of that, the printable page needs to have a different header (no navigation at all) and needs to page break after each individual product as well as putting the header at the top of each page. Can this be done?
Quote:
Originally Posted by XTech
This will pull just the name of the file, and put it into the var; $filename.
Then you can just use it like:
Can be done both via CSS and PHP. How do you have page breaks, though?
One printer may have margins of 0.5, another of 2.5... ?
I am trying not to hassle the difference between printers issues. I am simply adding a <br style="page-break-before:always;"> where I want a page break.