Targeting a technology

Properties of a theme can be targeted to apply specifically to pages created by XPages or Domino® Web Engine technology.

Targeting a technology

Certain properties or controls are specific to a technology. To match this requirement, target filters can be added to control and property tags to specify the target technology:

<control target="xsp"> <- this entire entry is uniquely for xsp
	... 
</control> 	 
<control> 	
	... 	
  <property target="classic">  <- this property is uniquely for classic technology
	  ... 	
  </property> 
</control> 	

In the example, the first Control element applies only when the XPages technology is used. The second Control element applies to both technologies, but contains a property element that applies only when the classic technology is used.

The filtering happens when the file is read, thus avoiding any runtime penalty. Moreover, this allows the leveraging of technology specific capabilities, such as the formula evaluation for the classic technology:

<control>
  	<property target="classic">
    	<name>styleClass</name>
    	<value>@if(.....)</value>
  	</property>
  	<property target="xsp">
    	<name>styleClass</name>
    	<value>buttonClass</value>
  	</property>
</control> 

In the example, the styleClass element is defined differently depending on which technology is being used. The first property element takes advantage of the classic technology to use the formula language to define the value. The second property element will always have the value of buttonClass.