O'Reilly logo

Microsoft® SharePoint® Designer 2010 Unleashed by Kathy Hughes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a Printer Friendly Button to a Page Layout

A common requirement when configuring page layouts is to add a custom print button to enable users to print the contents of publishing pages via the Web interface.

The following example assumes that you have created a print.css file and saved the file in the site collection’s Style Library. To learn how to create a print.css file for SharePoint, see Chapter 16.

In my case I needed to separately add the PlaceHolderAdditionalPageHead content placeholder into the top part of my page layout because it did not exist. The page layout I had created was based on the Article Page content type.

The following JavaScript code (see Listing 15.1) differentiates normal (or screen) CSS to print CSS and switches ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required