I am adding some support to print specific pages of my site in a nice printer-friendly format. So the first thing I did was create a more-or-less blank Layout that I can drop content into. Then I went to a content page and assigned this layout to the "Print" device in Presentation Details.
That does not seem to do anything. I'm still getting the exact same output on Print Preview that I saw before I defined any Print settings. To be honest, I'm not entirely sure how this should work. Presumably, my browser has to request the page again with a new user agent (???) to get Sitecore to return a different rendering of the page... but I've tried Firefox, Chrome, and IE and get the same undesired output from my "Default" device.
Must be missing something obvious?
The Print device, by default, will be used when there is a ?p=1
querystring value on the page you want to print. The print preview in the browser is simply previewing the page with the Default device.
Try putting that querystring in the address and see if you get the layout you are expecting.
As you noted, there is the ability to switch Device via a Browser Agent, but that won't be useful here. That would mainly be used for mobile device detection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With