You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Shah Amit <am...@hotmail.com> on 2005/06/08 21:39:09 UTC

J2 - Printing web pages

Hi all,

I need to have a print button on some of the pages, which should print the 
page in a printer friendly format.

I know a little bit that this can be done by having different stylesheets 
for different media. However it seems that the velocity function - 
#includeStyleSheets() includes all the stylesheets. Is that customizable 
from outside (the way we can deploy our own decorators), or we would have to 
change jetspeed to do that ??

Thanks,
Amit



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: J2 - Printing web pages

Posted by Shah Amit <am...@hotmail.com>.
Hi Randy,

First of all, thanks a lot for response.

I noticed that $renderRequest.getAttribute("cssUrls") only lists the 
stylesheets named styles.css. I have two style sheets under - 
XXXX\decorations\portlet\html\tag\css

- style.css
- print.css


However in decorator-top.vm, when I override #includeStyleSheets(), 
$renderRequest.getAttribute("cssUrls") only seems to return 
/content/mydecorator/css/styles.css and /content/css/styles.css.

It is not really stopping me because I have hardcoded my stylesheet, but 
just wondering if I am doing something wrong, or this is just the way 
jetspeed is supposed to work ...

Once again, thanks for your helps !

Thanks,
Amit


----Original Message Follows----
From: Randy Watler <wa...@wispertel.net>
Reply-To: "Jetspeed Users List" <je...@portals.apache.org>
To: Jetspeed Users List <je...@portals.apache.org>
Subject: Re: J2 - Printing web pages
Date: Wed, 08 Jun 2005 21:49:33 -0600

Amit,

You can redefine the #includeStyleSheets() inline in your velocity 
templates, (i.e. decorator-top.vm), since we configure the appropriate 
velocity property to allow this: 
velocimacro.permissions.allow.inline.to.replace.global=true. I am not sure 
if you can also redefine the macro in decorator-macros.vm to override 
jetspeed_macros.vm... but it does not seem so.

Randy

Shah Amit wrote:

>Hi all,
>
>I need to have a print button on some of the pages, which should print the 
>page in a printer friendly format.
>
>I know a little bit that this can be done by having different stylesheets 
>for different media. However it seems that the velocity function - 
>#includeStyleSheets() includes all the stylesheets. Is that customizable 
>from outside (the way we can deploy our own decorators), or we would have 
>to change jetspeed to do that ??
>
>Thanks,
>Amit
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: J2 - Printing web pages

Posted by Randy Watler <wa...@wispertel.net>.
Amit,

You can redefine the #includeStyleSheets() inline in your velocity 
templates, (i.e. decorator-top.vm), since we configure the appropriate 
velocity property to allow this: 
velocimacro.permissions.allow.inline.to.replace.global=true. I am not 
sure if you can also redefine the macro in decorator-macros.vm to 
override jetspeed_macros.vm... but it does not seem so.

Randy

Shah Amit wrote:

> Hi all,
>
> I need to have a print button on some of the pages, which should print 
> the page in a printer friendly format.
>
> I know a little bit that this can be done by having different 
> stylesheets for different media. However it seems that the velocity 
> function - #includeStyleSheets() includes all the stylesheets. Is that 
> customizable from outside (the way we can deploy our own decorators), 
> or we would have to change jetspeed to do that ??
>
> Thanks,
> Amit
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org