You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jonny Wray <jo...@yahoo.com> on 2004/04/23 03:07:44 UTC

Page specific stylesheets

Hi,

I'm wondering if there's anyway to specify stylesheets specific to a
particular page.

I'm moving more and more of my markup over to using css for
positioning, and it really helps in making the components standalone.
But, positioning on a page level is really specific to a page, rather
than a global style sheet. So, if possible, I'd like to reflect that by
having a css per page specifying any css positioning needed.

Jonny

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


Re: Page specific stylesheets

Posted by Jonny Wray <jo...@yahoo.com>.
Yeah, that wouldn't work as I'm using Shell and a Body definition. This
means I only have one file with headers, navigation bar, footers, etc etc in
And my actual page only contain the content specific to that page. Very
nice, just how it should be really ;)

I guess overriding the stylesheet parameter of the containing shell is the
way to do it, as per the previous poster.


On 4/22/04 7:03 PM, "RWinter@boystown.com.au" <RW...@boystown.com.au>
wrote:

> 
> 
> 
> 
> 
> Instead of providing a style sheet for each page you could just override
> the global css definitions with page specific style definitions in the
> <head> of the html.
> ie
> <head>
> <style type="text/css">
>   your pagespecific style defs
> </style>
> </head>
> 
> 
> I'm still new to tapestry so I'm not sure how this is best accomplished. ie
> By using a component like Shell, or just plain old html in the template
> 
> 
> Roland
> 
> Harish Krishnaswamy <hk...@comcast.net> wrote on 23/04/2004
> 11:10:45:
> 
>> Yes you can, you simply have to pass it on to the Shell component from
>> the page
>> http://jakarta.apache.org/tapestry/doc/ComponentReference/Shell.html
>> 
>> -Harish
>> 
>> 
>> Jonny Wray wrote:
>> 
>>> Hi,
>>> 
>>> I'm wondering if there's anyway to specify stylesheets specific to a
>>> particular page.
>>> 
>>> I'm moving more and more of my markup over to using css for
>>> positioning, and it really helps in making the components standalone.
>>> But, positioning on a page level is really specific to a page, rather
>>> than a global style sheet. So, if possible, I'd like to reflect that by
>>> having a css per page specifying any css positioning needed.
>>> 
>>> Jonny
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>> 
>>> 
>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>> 
> 
> 
> ##############################################################################
> #######
> This e-mail message has been scanned for viruses by our email server and
> cleared.
> ##############################################################################
> #######
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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


Re: Page specific stylesheets

Posted by RW...@boystown.com.au.




Instead of providing a style sheet for each page you could just override
the global css definitions with page specific style definitions in the
<head> of the html.
ie
<head>
  <style type="text/css">
    your pagespecific style defs
  </style>
</head>


I'm still new to tapestry so I'm not sure how this is best accomplished. ie
By using a component like Shell, or just plain old html in the template


Roland

Harish Krishnaswamy <hk...@comcast.net> wrote on 23/04/2004
11:10:45:

> Yes you can, you simply have to pass it on to the Shell component from
> the page
> http://jakarta.apache.org/tapestry/doc/ComponentReference/Shell.html
>
> -Harish
>
>
> Jonny Wray wrote:
>
> >Hi,
> >
> >I'm wondering if there's anyway to specify stylesheets specific to a
> >particular page.
> >
> >I'm moving more and more of my markup over to using css for
> >positioning, and it really helps in making the components standalone.
> >But, positioning on a page level is really specific to a page, rather
> >than a global style sheet. So, if possible, I'd like to reflect that by
> >having a css per page specifying any css positioning needed.
> >
> >Jonny
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


#####################################################################################
This e-mail message has been scanned for viruses by our email server and cleared.
#####################################################################################

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


Re: Page specific stylesheets

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Yes you can, you simply have to pass it on to the Shell component from 
the page 
http://jakarta.apache.org/tapestry/doc/ComponentReference/Shell.html

-Harish


Jonny Wray wrote:

>Hi,
>
>I'm wondering if there's anyway to specify stylesheets specific to a
>particular page.
>
>I'm moving more and more of my markup over to using css for
>positioning, and it really helps in making the components standalone.
>But, positioning on a page level is really specific to a page, rather
>than a global style sheet. So, if possible, I'd like to reflect that by
>having a css per page specifying any css positioning needed.
>
>Jonny
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>

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


Re: Page specific stylesheets

Posted by Jonny Wray <jo...@yahoo.com>.
Filip,

Thanks a lot, just what I was looking for. Obvious once it's been pointed
out, but saved me a lot of experimenting.

Jonny

On 4/23/04 12:51 AM, "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk> wrote:

> Well, my solution might be a little complicated, or so I think, but i t
> works for me. In my Border.jwc I have this:
> 
> <component id="shell" type="Shell">
>   ...
>   <binding name="stylesheets">
>     new org.apache.tapestry.IAsset[] {
>       assets.borderStylesheet,
>       page.assets.pageStylesheet
>     }
>   </binding>
> </component>
> 
> ...
> 
> <context-asset name="borderStylesheet" path="..."/>
> 
> And in each of my regular pages that need a page-specific stylesheet I
> include a line like this:
> 
> <context-asset name="pageStylesheet" path="..."/>
> 
> Alternatively, you could override BasePage to always provide a page-specific
> stylesheet. Hope this helps.
> 
> -Filip S. Adamsen
> 
> -----Original Message-----
> From: Jonny Wray [mailto:jonny_wray@yahoo.com]
> Sent: Friday, April 23, 2004 3:08 AM
> To: Tapestry users
> Subject: Page specific stylesheets
> 
> 
> Hi,
> 
> I'm wondering if there's anyway to specify stylesheets specific to a
> particular page.
> 
> I'm moving more and more of my markup over to using css for
> positioning, and it really helps in making the components standalone.
> But, positioning on a page level is really specific to a page, rather
> than a global style sheet. So, if possible, I'd like to reflect that by
> having a css per page specifying any css positioning needed.
> 
> Jonny
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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


RE: Page specific stylesheets

Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
Well, my solution might be a little complicated, or so I think, but i t
works for me. In my Border.jwc I have this:

  <component id="shell" type="Shell">
    ...
    <binding name="stylesheets">
      new org.apache.tapestry.IAsset[] {
        assets.borderStylesheet,
        page.assets.pageStylesheet
      }
    </binding>
  </component>

  ...

  <context-asset name="borderStylesheet" path="..."/>

And in each of my regular pages that need a page-specific stylesheet I
include a line like this:

  <context-asset name="pageStylesheet" path="..."/>

Alternatively, you could override BasePage to always provide a page-specific
stylesheet. Hope this helps.

-Filip S. Adamsen

-----Original Message-----
From: Jonny Wray [mailto:jonny_wray@yahoo.com] 
Sent: Friday, April 23, 2004 3:08 AM
To: Tapestry users
Subject: Page specific stylesheets


Hi,

I'm wondering if there's anyway to specify stylesheets specific to a
particular page.

I'm moving more and more of my markup over to using css for
positioning, and it really helps in making the components standalone.
But, positioning on a page level is really specific to a page, rather
than a global style sheet. So, if possible, I'd like to reflect that by
having a css per page specifying any css positioning needed.

Jonny

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




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