| Oracle® Fusion Middleware Idoc Script Reference Guide 11g Release 1 (11.1.1) Part Number E10726-01 |
|
|
View PDF |
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.
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:
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$>
User-related read-only variables make it possible to gather information about the current user.
The following read-only variables are related to users:
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".
The following variable is set only as internal flags, so it can be retrieved but not set directly.