Results 1 to 5 of 5

Thread: Printer-friendly using tiles

  1. #1
    Join Date
    Mar 2008
    Posts
    3

    Default Printer-friendly using tiles

    Hi,

    Using Tiles a template is made for displaying a general menubar, some user-credential data and a banner area. An 'empty' area is filled with the requested info each time a user initiates some action. When hitting the 'print' button I don't want to print all the 'general' stuff, but only the requested information and a small 'this info is comming from...' banner above and beneath.

    What's the best way of taggling this issue ?

    From the controller it's possible to examine some request parameter (e.g. ?print) and return a ModelView which uses a 'print' template or the 'normal' template when the parameter is not present. This would result in each page examining the request and determing the correct view.. while I was hoping for a more general solution; not having to alter flow logic and have the print-layout switch in e.g. Tiles.

  2. #2
    Join Date
    Jul 2005
    Location
    Geneva (Switzerland)
    Posts
    304

    Default

    The (arguably) best way to do that is via CSS. You can define a stylesheet for the "print" media (have a look at http://htmlhelp.org/reference/css/style-html.html) and in that stylesheet use "display: none" to hide what you dont want on the print media. You can of course do some more fancy stuff than just hiding the menu ...

  3. #3
    Join Date
    Mar 2008
    Posts
    3

    Default

    Hi Gehel,

    Thanks for your answer. The described solution does implement the wished functionality.


    When someone has a 'tiles' solution, directing to another template feel free to post. The css solution doesn't (easy) supply in disabling links (can use the display:none on every link/button but it's not wished.), buttons etc. Something which is usefull, since the 'printer-friendly' page is in a popup and we don't want the user to navigate the app using the popup.

  4. #4
    Join Date
    Sep 2012
    Location
    Australia
    Posts
    2

    Default

    Honestly, I don't have any idea about this method and I am glad that you shared about this.I know about CSS and I guess it is an advantage if someone has an idea for this but since I don't know how to run this then this is a big help for everyone in here.

  5. #5

    Default

    How about creating a PDF view?
    [URL="http://vicina.info"] 新闻,社区新闻,分类广告

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •