2

I Would like to customise the http://drupal.org/project/print style sheet.

In the readme file it says: - To modify the template of printer friendly pages, simply edit the print.tpl.php or the css/print.css files.

Re: css/print.css Does it refer to the print.css inside the print module or inside my theme? If inside the module, wouldn't this make the maintenance difficult when the module needs updating?

2 Answers 2

1

Though I haven't worked with print module but as per Drupal structure, if you have to override any CSS file(in your case print.css) of some module, you can simply write your style in your own CSS file which stay in your theme directory. But if you want to use the same file & keep your styling separate then simply cut that from the module directory & paste in your theme directory...mention the CSS file in your INFO of theme...and extend it as much as you want...

Don't forget to clear your cache after you do cut/paste & done with INFO file edit..

In same way...you can copy your print.tpl.php file from the module folder & paste in your theme directory(no need to mention tpl in INFO file)...& then you can do as much editing as you want to have custom look...clear your cache in this case too..

I hope this will solve your worry about maintenance as you will get this file in your theme folder itself...

2

Don't edit directly your print.css file, because when you update the module, this will erase your edits

You have to copy the print.css file on your own theme and then indicate the link to this file in the module admin panel : /admin/config/user-interface/print/common

As an alternative you can also copy the print.tpl.php on your theme template dir if you want to add/remove some html content

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.