I've heard of PHP code whose purpose was to dynamically create CSS files that were output into the final html (in the header, not as a link to a file). If you wanted to repeat that kind of functionality, it seems like it would be easy to do. The one problem I see is that if you use a CSS file as a template, it may require a different DTD. CSS alone is not "well formed XML" and I think Tapestry is expecting the templates to be well formed. Alternatively, having your CSS inside an html template may be a problem if Tapestry does not remove the <html> and <body> tags, since your content pages will have their own <html> and <body> tags.
I haven't had a use for this yet, but I will post my results if I get to it. Daniel On 6/25/07, Jiri Mares <[EMAIL PROTECTED]> wrote:
And do you consider it as interesting to implement it? Jirka Howard Lewis Ship napsal(a): > > It should be possible, there are meta-data settings on pages that > control the response content type. However, there's a couple of road > blocks in the current code base, such as the fact that there's no > outer-wrapper element for HTML (an template root element that does not > render an element into the output stream), and no way to remap the > file extension. > > On 6/22/07, Jiri Mares <[EMAIL PROTECTED]> wrote: >> >> Hi ... >> >> or can I create page that is going to serve CSS instead of HTML?? >> >> Jirka >> >> Howard Lewis Ship napsal(a): >> > >> > You can use expansions inside a <style> block, just as you can >> > elsewhere in an HTML template. However, you have to eliminate the >> > HTML comments when you do so, or the expansions will not be processed: >> > >> > <style type="text/css"> >> > >> > body { >> > >> > background-color: #2D374A; >> > >> > background-image: url(${someBackground}); >> > >> > } >> > >> > .MainTable { >> > >> > background-color: #B5BFD2; >> > >> > background-image: url(${someBackground}); >> > >> > } >> > >> > </style> >> > >> > On 6/20/07, Bruce Petro <[EMAIL PROTECTED]> wrote: >> >> Question: I've learned so far, to display an image ... you do >> something >> >> like this: >> >> >> >> SomePage.java >> >> >> >> @Inject >> >> >> >> @Path("./art_logo.png") >> >> >> >> private Asset _someIcon; >> >> >> >> and then SomePage.html you do >> >> >> >> <img src="${someIcon}"/> >> >> >> >> >> >> >> >> BUT --- what's the syntax to use these in css EG: background images? >> >> >> >> >> >> >> >> <style type="text/css"> >> >> >> >> <!-- >> >> >> >> body { >> >> >> >> background-color: #2D374A; >> >> >> >> background-image: url(someBackground); >> >> >> >> } >> >> >> >> .MainTable { >> >> >> >> background-color: #B5BFD2; >> >> >> >> background-image: url(someBackground); >> >> >> >> } >> >> >> >> --> >> >> >> >> </style> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- Jiří Mareš (mailto:[EMAIL PROTECTED]) ČSAD SVT Praha, s.r.o. (http://www.svt.cz) Czech Republic --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]