Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Tools Reference > Special Behavior Supported by Templates > Conditional Tags >
Designing Browser Group-Specific Templates
The SWE framework supports a set of browser group-related conditions that can be checked in the Web templates using SWE conditional tags. This allows showing different sections of the template based on which browser is used to access the application.
The information about the supported user agents is defined in the Web Browser Administration views accessible through the Web Client out-of-the-box. Siebel applications have a series of predefined browsers (for example, Internet Explorer 5.0, Netscape Navigator 4.0, and so on) and their associated capabilities. Examples of capabilities include items such as "FrameSupport," which indicates that a browser can support ActiveX controls. Customers can modify the records that define these browsers and their capabilities as new browsers or new versions of existing browsers are introduced. Details on how to do this are provided in the Applications Administration Guide.
Given below is an example of the capabilities associated with Microsoft Internet Explorer:
[IE 5.0]
CookiesAllowed=TRUE
HighInteract=TRUE
ActiveX=TRUE
Browser=IE
Version=5
DefaultMarkup=HTML
VBScript=TRUE
JavaScript=TRUE
JavaApplets=TRUE
User-Agent=Mozilla/4.0 (compatible; MSIE 5.0
SynchExternalContent=TRUE
FramesSupport=TRUE
TablesSupport=TRUE
Below is an example of the extended sections for Microsoft Internet Explorer:
[MSIE 5.0]
User-Agent=Mozilla/4.0 (compatible; MSIE 5.0
Parent=IE 5.0
Accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
[MSIE 5.5]
User-Agent=Mozilla/4.0 (compatible; MSIE 5.5
Parent=IE 5.0
Version=5.5
Accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
XML=TRUE
WAP=FALSE
StyleSheets=TRUE
JavaScriptVer=1.3
DHTML=TRUE
The following conditions can be used to check browser related information.
NOTE: Practically speaking the term "User Agent" is a synonym for "Browser." Its usage comes from the User Agent header property of an HTTP request which provides a unique identifier for the type of client that is making the request, such as "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0)" for Microsoft Internet Explorer 5.0.
The conditions are specified in the format
<service>
,<method>
,<args> ...
- Service: Web Engine User Agent
Method: IsUserAgent
Args: UserAgent:<A User Agent name defined in the UA.INI file>
Purpose: Checks for a particular User Agent.
Example:
<swe:if condition="Web Engine User Agent, IsUserAgent, 'UserAgent:MSIE 5.5'">
...
</swe:if>
The condition evaluates to TRUE for the Microsoft Internet Explorer 5.5 browser and FALSE for all other browsers.
- Service: Web Engine User Agent
Method: TestCapability
Args: Capability Name:Capability Value
Purpose: Check for specific user agent capabilities. When more than one capability is provided as an argument, the condition evaluates to TRUE when the user agent has all these capabilities (AND operation).
Example:
<swe:if condition="Web Engine User Agent, TestCapability, 'JavaScript:TRUE', 'JavaApplets:TRUE'">
...
</swe:if>
The condition evaluates to TRUE for any user agent that supports JavaScript and Java Applets in the browser.
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Tools Reference, Version 7.5, Rev. A Published: 18 April 2003 |