0

I am trying to find the cleanest way to create a signature (your written signature, not forum signatures) and date line on printable pages.

I would like to do it without actually changing template files just to keep things upgradable without going back and tampering with it (it might not be me). However, if I have to I will.

Basically I need to have a "sign and date" line that shows up only when a node is being printed not when viewed on the webpage.

Something like:

By signing this you agree to our terms of service and agree to pay the minimum service charge. ETC...

Name:________________________Date:_________

(*Comments not printed)

Obviously, this doesn't need to actually show up on any webpage but only show when someone hits CTRL+P and prints the page.

Is there a module that can do this? Or is using the print module the best way to accomplish this? If it only requires a few lines of HTML/PHP, I would rather do that than add another module. I am using Display Suite...so maybe a custom view/field could work?

Thanks

1

Add a code field to Display Suite that is visible on nodes, and add your HTML to the code field.

Place the field last for the specific view mode, and make sure to assign a class (or assign the class directly in the html of the code field) on outer html element.

Test that the html is displayed on node view (normal page view).

In you theme's style css (css that targets web page view) set the display of this class to none. Now it should only show for print. If it does not go into your theme's print.css file and set the display to block or whatever you prefer. If there is no print.css (highly unlikely) then just add a @media print rule to your css.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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