Jump to:

23550 Posts in 19336 Topics by 2890 members

General Questions

SilverStripe Forums » General Questions » Add Print Page feature

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2704 Views
  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Add Print Page feature Link to this post

    Does SS have a feature that enables visitors to print the page they're on? Some websites have icons for printing or emailing or saving pages as pdfs. Not sure how that's done, but would love to give my visitors an icon so they can print the page.

    Thanks!

  • Willr
    Avatar
    Forum Moderator
    5511 Posts

    Re: Add Print Page feature Link to this post

    Well most browsers have this feature built in without adding any code to the page. CTRL+ P (Or File -> Print ). If you want a print button for the less adept users then have a look at the sharethis module - http://silverstripe.org/share-this-module/. It includes a Print this page button which you can include on your pages.

    The code to print a page is pretty simple as well - You can add a link like this to your themes Page.ss file.

    <a href="#" onclick="javascript: window.print();">Print this Page</a>

  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Re: Add Print Page feature Link to this post

    Excellent - thank you once again Willr!
    ~ James

  • SerenityIT
    Avatar
    Community Member
    13 Posts

    Re: Add Print Page feature Link to this post

    By any chance is there a module that gives a print only view so that the template doesn't get printed out along with the content?

  • Greg1
    Avatar
    Community Member
    28 Posts

    Re: Add Print Page feature Link to this post

    It is probably easiest to just do this with a Print specific CSS.

    Maybe try this: http://www.alistapart.com/articles/goingtoprint/

    2704 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.