CSData 1 0-getCSPageURL

From ADF Docs
Jump to: navigation, search

Attention: Do not change any text in the description, signature, and paramter sections.

Return to CSData_1_0


Given a Commonspot Page ID build a URL to that page.


public string getCSPageURL ( numeric pageID )


Required Name Type Description
required pageID numeric


Example 1: Use getCSPageURL to return the URL for a page where the PageID was stored in an element:

     relativePageURL =  application.ADF.CSData.getCSPageURL(items[i].values.myPageID);

Example 2: Use getCSPageURL in a datasheet column render handler to convert a pageID to a URL:

	if ( LEN(Request.Datasheet.currentColumnValue) )
		pageURL = application.ADF.csData.getCSPageURL(Request.Datasheet.currentColumnValue);
		pageURL = "";
<cfsavecontent variable="request.datasheet.currentFormattedValue">
		<cfif LEN(pageURL)>
			<a href="#pageURL#">#pageURL#</a>
<cfset request.datasheet.currentSortValue = pageURL>