hi,
When using resource references for linking to a CSS file, there is a
possibility to have multiple versions that can be selected via the style
/ variation setting.
What I'd like to achieve is, that the style / variation is picked based
on the page where the resource reference is used.
This I can achieve currently by placing a wicket:link element in the header:
<head>
<wicket:link>
<link rel="stylesheet" type="text//css/" href="theme./css/">
</wicket:link>
</head>
This is all fine, however if I don't use the above "autolink" feature,
instead I'd like to add the reference as a HeaderItem in code, picking
up of the style / variation no more works. Looking into the source code,
the only path where style / variation info is read in this case if from
getSession().getStyle(), which is not OK for me, because I'd like to
have it set based on the page and not based on a global setting.
Is there some way to make the HeaderItem aware of the page and pass the
style/variation info to the resource reference?
Thanks,
Istvan