The answer is in the second paragraph on the page linked.
On 7/22/07, Chris Lewis <[EMAIL PROTECTED]> wrote:
That looks promising - I wonder, will these style elements appear in the head, or remain where there are declared in the template? Andreas Andreou wrote: > http://tapestry.apache.org/tapestry4.1/components/general/style.html > > On 7/23/07, Chris Lewis <[EMAIL PROTECTED]> wrote: >> >> Well I'm pretty sure there can only be on Shell component for a rendered >> page, so consider this. Each page object has a Map of page assets >> (IAsset), and what you want to do have your layout (border component >> with your Shell) include whatever it wants as well as whatever the >> calling page/component wants. I'm quite sure you can accomplish this >> with an ognl expression in your layout component, which would access the >> assets Map of the calling page. What's more is since you'd define assets >> in your page specs, you could do this without touching the java code of >> your pages. >> Let me know what you come up with as this could probably be useful to >> others. >> >> chris >> >> #Cyrille37# wrote: >> > Thanks a lot Chris, >> > >> > Now how can I add a Page.html specific stylesheet ? >> > >> > If the border define the use of a stylesheet with the @Shell like : >> > >> > Border.html: >> > <html jwcid="@Shell" title="MyApp" stylesheet="asset:GeneralCss"> >> > ... >> > >> > How the Page.html could add a specific stylesheet because it's <head> >> > won't be used, so how to ? >> > >> > Thanks >> > cyrille. >> > >> > >> > Chris Lewis a écrit : >> >> Remember that by default a component's body is the whole template, >> >> unless you use the special component it $content$, in which case >> >> everything /inside/ the element with this jwcid will be used and all >> >> else ignored. So for your border component use valid html instead of >> >> the invalid bit you currently have: >> >> >> >> Border.html: >> >> >> >> <html jwcid="@Shell" title="Scrutalys" disableCaching="true" >> >> consoleEnabled="true" debugEnabled="true" browserLogLevel="DEBUG"> >> >> <body> >> >> <span jwcid="@RenderBody"> >> >> * <!-- Tapestry will render the body of the containing >> >> component/page here. -->* >> >> This is the page content. >> >> </span> >> >> </body> >> >> </html> >> >> >> >> Page.html: >> >> >> >> <html > >> >> <head> >> >> ... >> >> </head> >> >> <body jwcid="$content$"> >> >> <span jwcid="@Border"> >> >> * <!-- >> >> The result of this will be all of the content within this page, >> >> rendered within your Border component. >> >> Everything outside of this will be ignored. >> >> -->* >> >> ... >> >> </span> >> >> </body> >> >> </html> >> >> >> >> #Cyrille37# wrote: >> >>> Hello >> >>> >> >>> I got a @Border with a @Shell to get all stuff common for all pages. >> >>> It's working but ... >> >>> All that <span> around the <body> are not compatible with HTML, so >> >>> wysiwyg editor are not happy. >> >>> >> >>> Perhaps I've miss some knwoledge ? >> >>> >> >>> The Boder.html : >> >>> >> >>> <html> >> >>> ... >> >>> </head> >> >>> <span jwcid="$content$"> >> >>> <span jwcid="@Shell" title="Scrutalys" disableCaching="true" >> >>> consoleEnabled="true" debugEnabled="true" browserLogLevel="DEBUG"> >> >>> <body jwcid="@Body"> >> >>> ... >> >>> <span jwcid="@RenderBody">This is the page content.</span> >> >>> </body> >> >>> </span> >> >>> </span> >> >>> </html> >> >>> >> >>> A tipycal page.html : >> >>> >> >>> <html > >> >>> ... >> >>> </head> >> >>> <body jwcid="$content$"> >> >>> <span jwcid="@Border"> >> >>> ... >> >>> </span> >> >>> </body> >> >>> </html> >> >>> >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com