hi Marcus,
this solution is perfect provided i have a <html><head>....</head></html>
template defined separately for each page. but usually this is written once
in some "Border" or "Layout" component's template. In such a case I cannot
predict how many css links will be placed inside <head> section because many
pages will use the same layout component.
I would need something like this:
(Layout.html)
<head>
<t:loop source="cssCollection" value="css">
<link href="${css}" rel="stylesheet" type="text/css"/>
</t:loop>
</head>
(Layout.java)
class Layout {
private List<String> cssCollection;
...
}
but the question is: how to fill up the cssCollection array with css links
of all components of given page before the page starts rendering?
On 7/2/07, Marcus <[EMAIL PROTECTED]> wrote:
Hi Janko,
You could try:
@Inject
@Path("context:assets/css/layout.css")
private Asset _layoutCss;
public Asset getLayoutCss() {
if (yourCondition)
return _layoutCss;
else
return "";
}
<head>
<link href="${layoutCss}" rel="stylesheet" type="text/css"/>
</head>
Marcus