Difference between revisions of "CSData 1 0-getStandardMetadata"
From ADF Docs
Dbeckstrom (talk | contribs) (→Description) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
__NOTOC__ | __NOTOC__ | ||
Attention: Do not change any text in the description, signature, and paramter sections. | Attention: Do not change any text in the description, signature, and paramter sections. | ||
Line 13: | Line 5: | ||
== Description == | == Description == | ||
+ | Given a Page ID returns the standard metadata for the page. | ||
== Signature == | == Signature == | ||
− | public struct | + | public struct <strong>getStandardMetadata</strong> ( numeric csPageID ) |
== Parameters == | == Parameters == | ||
− | + | <table id="lib-params"> | |
− | + | <tr class="header"> | |
− | + | <td>Required</td> | |
− | + | <td>Name</td> | |
− | + | <td>Type</td> | |
− | + | <td>Description</td> | |
− | + | </tr> | |
− | + | <tr> | |
− | + | <td class="required">required</td> | |
− | + | <td>csPageID</td> | |
− | + | <td>numeric</td> | |
− | + | <td></td> | |
− | + | </tr> | |
− | + | </table> | |
+ | === Usage: === | ||
+ | Example 1: Using the page ID from a field in a custom element, get the page metadata for the page and find the subsite ID for the subsite in which the page is located: | ||
+ | <source lang="cfm"> | ||
+ | <cfscript> | ||
+ | pageMeta = application.ADF.CSData.getStandardMetadata("items[i].values.mypageID"); | ||
+ | if ( StructKeyExists(pageMeta, "subsiteid") AND LEN(pageMeta.subsiteid)){ | ||
+ | pagesubsiteid = pageMeta.subsiteid; | ||
+ | } | ||
+ | </cfscript> | ||
+ | </source> |
Latest revision as of 22:35, 26 March 2012
Attention: Do not change any text in the description, signature, and paramter sections.
Return to CSData_1_0
Description
Given a Page ID returns the standard metadata for the page.
Signature
public struct getStandardMetadata ( numeric csPageID )
Parameters
Required | Name | Type | Description |
required | csPageID | numeric |
Usage:
Example 1: Using the page ID from a field in a custom element, get the page metadata for the page and find the subsite ID for the subsite in which the page is located:
<cfscript>
pageMeta = application.ADF.CSData.getStandardMetadata("items[i].values.mypageID");
if ( StructKeyExists(pageMeta, "subsiteid") AND LEN(pageMeta.subsiteid)){
pagesubsiteid = pageMeta.subsiteid;
}
</cfscript>