PTConditionals Tags


This tag library contains tags that displays content based if certain conditions are met much like the logic.if tag. But, unlike the generic logic.if tag the tags in this library are used to check common WCI conditions, such as checking for the current page being a Community page or being on a specific WCI Page. These tags only cover common conditional checks,but in these cases they are easier to use and result in cleaner and clearer tag code than the logic.if tag.

Tag Library Information
Nameptcond
Version1.0
 

Tag Summary
iscurrcommunityThis is a conditional tag used to output HTML and Adaptive Tags when on a specified Community page. Nothing is displayed if not in a Community or in the specified Community. The specific Community is determined by passing in the Community Id or name. The Community Id is specified either by directly passing the id value in the 'id' attribute or passing in the name of a tag variable with a list of ids. Comparison against Community name will check if the current Community name contains the passed in value. Exact match is done by using the begin of line and end of line markers.In the case when both ids and name is specified the tag body is displayed if one (or more) of the checks pass. Nest two or more tags to perform checks where both id and name need to match.
iscurrcommpageThis is a conditional tag used to output HTML and Adaptive Tags when on a specified Community Page. This tag does not do anything when not on a Community page. Specify a page by passing in the page Id or name. The page Id is specified either by directly passing the id value in the 'id' attribute or passing in the name of a tag variable with a list of ids. Comparison against Page name will check if the current Page name contains the passed in value. Exact match is done by using the begin of line and end of line markers.In the case when both ids and name is specified the tag body is displayed if one (or more) of the checks pass. Nest two or more tags to perform checks where both id and name need to match.
iscurrenturlThis 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.
isincommunityThis is a conditional tag used to output HTML and Adaptive Tags when on a Community page. Nothing is displayed if not in a Community. Use the isnotincommunity tag to check when the current page is not a Community page.
isnotincommunityThis is a conditional tag used to output HTML and Adaptive Tags when NOT on a Community page. Nothing is displayed if in a Community. This tag has the opposite behavior of isincommunity tag.
 


Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-3 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.