XPages Themes Question

I’ve started looking at using themes to manage various elements, like adding resources, so they’re available on all pages, and have a couple of questions.

I want to set the stylesheet in an applicationScope variable, but this doesn’t seem to work. If I hard-code the stylesheet name, it works; if I use javascript and specify the stylesheet based on an if statement not including scoped variables, it works; but if I set the theme to use the stylesheet with this, it doesn’t:

<content-type>text/css</content-type>

<href>#{javascript:applicationScope.stylesheet}</href>

Could someone confirm whether or not scoped variables can be used in themes, or am I just doing something wrong?

Secondly, can themes be used to set XPage properties such as pageIcon and pageTitle? Sorry, just answered that, but I’ll add it here in case anyone wants to know - yes, use:

<name>ViewRoot</name>

<property>

	<name>pageTitle</name>

	<value>Findus Group Intranet</value>

</property>

override=“false” allows specific pages to be called something else.

Subject: Update after further testing

Scoped variablescan be used for properties -I’ve got it working for pageTitle and pageIcon.

The problem is javascript for href property of a resource. It doesn’t work with an if statement (my dodgy memory was at fault). With javascript, if I look at the source it shows this:

Does nyone know how to use javascript for the href property in a theme?