PTConditionals Tags
Tag iscurrenturl


This is a conditional tag used to output HTML and Adaptive Tags when on a specific WCI page by comparing against the page URL. The output content is placed inside the tag body and is displayed if the page URL satisfies parameters passed in through tag attributes. Nothing is displayed when not on the specified page. There are two types of URL comparisons.The first way is to check if the URL contains supplied strings through the contains1-5 attributes. These attributes are used to check for query string parameters or existence friendly URL keywords. Multiple contains attributes are ORed, meaning the tag body is displayed when either one of the attributes are true. ANDing multiple string comparisons is done by nesting two or more tags.The second way is to use attributes checking for specific WCI pages. For example using the 'loginpage' attribute will run the tag body when on the Login page. With these attributes the tag performs the URL check internally. It is also possible to combine both attribute types. When doing this, the tag body runs when either URL matches or on one of the specified pages. NOTE: Be aware that Urls could change depending on Friendly Urls being enabled or disabled. You might want to include checks for both friendly and non-friendly Urls.

Example:
<pt:ptcond.iscurrenturl pt:contains1="userid=1"/>
Page URL contains Query string parameter userid with value 1
</pt:ptcond.iscurrenturl>
<pt:ptcond.iscurrenturl pt:loginpage="true"/>
You are on the Login Page
</pt:ptcond.iscurrenturl>
<pt:ptcond.iscurrenturl pt:contains1="server.pt/mypage" pt:contains2="server.pt/directory"/>
You are either on a MyPage or Directory Page
</pt:ptcond.iscurrenturl>
<pt:ptcond.iscurrenturl pt:contains1="space=MyPage"/>
  <pt:ptcond.iscurrenturl pt:contains1="userid=1"/>
  You are on a MyPage and your User Id is 1
 </pt:ptcond.iscurrenturl>
</pt:ptcond.iscurrenturl>


Tag Information
Tag Nameiscurrenturl

Attributes
NameTypeRequiredDefault ValueDescription
contains1stringfalsenullChecks if the page URL contains the value. Tag body is displayed if at least one of the contains attribute values are found in the URL.
contains2stringfalsenullChecks if the page URL contains the value. Tag body is displayed if at least one of the contains attribute values are found in the URL.
contains3stringfalsenullChecks if the page URL contains the value. Tag body is displayed if at least one of the contains attribute values are found in the URL.
contains4stringfalsenullChecks if the page URL contains the value. Tag body is displayed if at least one of the contains attribute values are found in the URL.
contains5stringfalsenullChecks if the page URL contains the value. Tag body is displayed if at least one of the contains attribute values are found in the URL.
searchresultpagebooleanfalsefalseSet to 'true' to display tag body if current page is a Search Result page.
loginpagebooleanfalsefalseSet to 'true' to display tag body if current page is a Login page.
knowledgedirpagebooleanfalsefalseSet to 'true' to display tag body if current page is a Knowledge Directory page.


Copyright 2005 Plumtree Software, Inc.