I have a Drupal website and I need to create a link to a different version of the same page that opens up in a new window but hides all the side bars, blocks and header and just shows the main content. This is so people can print the main content of the page without all the extra bits.
I know I can add in a link to a print version like <a href="print version of page" target="_blank">print version</a>. But then I want to add a new CSS class to the page which I could use to hide the extra bits. I am not sure how I can add the CSS class to the link/page.
I guess I could also use Javascript but not sure about which method to use for this.
Try the Drupal Print module, it provides customization for printing pages in Drupal.