Transforming URLs Using Adaptive Tags
The pt:common.url and pt:common.transformer tags allow
you to create and manipulate gatewayed URLs.
Note: In ALI portal 6.1 and earlier, these tags are implemented
as pt:url and pt:transformer. This syntax is still supported.
The
pt:common.url tag is used to transform
URLs that should be gatewayed. If the URL in the
pt:href attribute is outside the gateway, it will be transformed to an absolute
URL. This feature does not generate a link in HTML; it obtains the
URL as a string and passes it to a client-side function, as shown
in the following example.
<script>
function myFunction()
{
document.write("<pt:common.url pt:href="myURL" xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'/>");
}
The
pt:common.transformer tag
allows you to turn off JavaScript URL transformation in a gatewayed
page. Set the
pt:fixurl attribute to "off" as shown
below.
<pt:common.transformer pt:fixurl="off" xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'/>
The transformer will not insert calls to the JavaScript URL transformation
function for the rest of the file, unless you switch the feature back
on in a subsequent directive (with a
pt:fixurl attribute of "on").