RE: printer-friendly template questions

"Greg Kerdemelidis" <[email protected]>
Newsgroups gmane.comp.cms.jahia.template
Message-ID <[email protected]>
Hi George,

Just a couple of suggestions here:

1) The trick here would be to have a media=print css file, while is
included in all the pages. You would have to look through the web layout
and produce appropriate printer versions of the tags/id's. Things like
stripping out the menu + header, hiding the footer, etc. Have a google
around for more information about this. It's possibly not what you're
looking for, but it does give your users the ability to produce
good-looking ad-hoc prints from the site. We have used this approach
successfully a few times in the past.

2) You could implement this by having the page link encode the current
URL and pass it as a parameter to another template / servlet:

Eg, for a page /jahia/Jahia/pid/123, produce a link looking something
like:

/Jahia/Jahia/sendtofriend?url=/jahia/Jahia/pid/123

The sendtofriend template would use the RequestDispatcher to dispatch
the request internally to /jahia/Jahia/pid/123, collect the result in a
StreamBuffer (or whatever), and send that to the recipient. Oh, you'd
need a page with the target email address form first, but you get my
drift...

Sound about right?

Regards,

Greg Kerdemelidis
Senior Java Developer
 

MSO New York -- A Diligent Company
Christchurch, New Zealand


-----Original Message-----
From: George Myers [mailto:[email protected]] 
Sent: Tuesday, 19 April 2005 9:44 a.m.
To: [email protected]
Subject: printer-friendly template questions

I have two related questions.

1. I want to create a printer-friendly view of any page of site content.
  The latest documentation has nothing on this yet 
  - but has an empty section showing that this is planned.
   Can a Jahia team member please post a pre-release version of that
information to
   advise on how best to do this.   I am sure this has been done by
   other Jahia users and I really don't want to
   re-invent this, so I would very much appreciate some sample template
code.

2. I want to create a feature to "send this page to a friend" 
  - the contents in printer-friendly format, not just the URL -
   to a specified email address.   Same points as above.

Any help would be greatly appreciated.

thanks,
George.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.