Skip Headers
Oracle® Fusion Middleware Idoc Script Reference Guide
11g Release 1 (11.1.1)

Part Number E10726-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to current chapter
Up
Go to next page
Next
View PDF

3.7 Read-Only Variables

Read-only variables can be used to gather information about the current template, the user who is currently logged in, or other current settings. These variables are read-only and cannot be assigned a value.

3.7.1 Template Read-Only Variables

Template-related read-only variables make it possible to create conditional content in a template based on the identity of the template. These pre-defined variables allow you to display the class, file path, name, or type of any template on a Content Server web page. This is particularly useful while you are developing your Web site.

The following read-only variables are related to templates:


"TemplateClass"
"TemplateFilePath"
"TemplateName"
"TemplateType"

3.7.1.1 Template Read-Only Variable Example

In this example, the internal name of the template appears under the Administration link in the left sidebar of all Content Server web pages. To accomplish this change, the pre-defined TemplateName variable (shown in bold below) was added to the pne_nav_admin_links include that defines the Administration links.

The following is an example of using the TemplateName pre-defined variable to display the internal template name on a web page:

<$if IsSubAdmin$>
<tr>
    <td>
        <a href="<$HttpCgiPath$>?IdcService=GET_ADMIN_PAGE&Action=
           GetTemplatePage&Page=ADMIN_LINKS"
        OnMouseOver="imgAct('admin')"
        OnMouseOut="imgInact('admin')">
        <img src="<$HttpImagesRoot$>
           <$button_admin_grey_ish_image$>" width="<$navImageWidth$>"         height="<$navImageHeight$>" name="admin" border="0"         alt="<$lc("wwProductAdministration", ProductID)$>"></a>
    </td>
        <td>
        <a class=pneHeader href="<$HttpCgiPath$>?IdcService=GET_ADMIN_
              PAGE&Action=GetTemplatePage&Page=ADMIN_LINKS"
        OnMouseOver="imgAct('admin')"
        OnMouseOut="imgInact('admin')">
        <$lc("wwAdministration")$></a>
    </td>
</tr>
<tr>
    <td colspan=2><font color=#FFFFFF style="Arial"
        size="-1"><$TemplateName$></font></td>
</tr>
<$endif$>

3.7.2 User Read-Only Variables

User-related read-only variables make it possible to gather information about the current user.

The following read-only variables are related to users:


"DelimitedUserRoles"
"ExternalUserAccounts"
"ExternalUserRoles"
"UserAccounts"
"UserAddress"
"UserAppRights"
"UserDefaultAccount"
"UserFullName"
"UserName"
"UserRoles"

3.7.3 Content Read-Only Variables

One content-related read-only variable, "SourceID", makes it possible to retrieve the Content ID of the current dynamic server page.

This variable returns the same value as ref:dID. See "Referencing Metadata in Dynamic Server Pages".

3.7.4 Other Read-Only Variables

The following variable is set only as internal flags, so it can be retrieved but not set directly.


"SafeDir"