[opencms-dev] Create Print Friendly

Arian Abrahantes Quintana Arian.Abrahantes.Quintana at cern.ch
Tue Oct 17 09:06:35 CEST 2006


Hi:
 
Well if you want to take the template out. Why don't you try to create a "clean template" and in this way you only use one if statement. Pass the variable forPrint in the request context
 
if (forPrint==yourPrintvalue){
   include template for printing version
}else{
  include regular template
}
 
You will only save a few if statements but basically is the same that gaith said but writing another template. I don't imagine other solution.
 
hope it helps,
 
arian

________________________________

From: opencms-dev-bounces at opencms.org on behalf of Stanczak Group
Sent: Tue 10/17/2006 7:10 AM
To: The OpenCms mailing list
Subject: Re: [opencms-dev] Create Print Friendly



So have the print friendly part in the detail file? Is there not a way
to temporarily switch the template out?

Gaith Bader wrote:
> Well, I do it by flagging a variable, lets call it printFriendly here,
> and then, have IF statements that check for it if its true and
> then omit code snippets  and replace it with an other that is Print
> Friendly.
>
> All that should be located in your template page.
>
> ____
> Gaith Bader
> Computer Systems Officer
> School of Computer Science and Engineering
> The University of New South Wales
>
>
> On 17/10/2006, at 12:47 PM, Stanczak Group wrote:
>
>> How do you make it so a user can click a link and you can switch your
>> template to a print friendly one? Is this done buy setting that
>> property for that request? How is this done?
>>
>> --
>> Justin Stanczak
>> Stanczak Group
>> 812-735-3600
>>
>> "All that is necessary for the triumph of evil is that good men do
>> nothing."
>> Edmund Burke
>>
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please
>> visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev

--
Justin Stanczak
Stanczak Group
812-735-3600

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev


-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 5980 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061017/76500e57/attachment.bin>


More information about the opencms-dev mailing list