Difference between revisions of "CSData 1 0-getCustomMetadata"

From ADF Docs
Jump to: navigation, search
(Description)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 +
Attention: Do not change any text in the description, signature, and paramter sections.
 +
 +
Return to [[CSData_1_0]]
 +
 
== Description ==
 
== Description ==
 +
Given a Page ID returns the custom metadata for the page.
  
== Signature ==
+
== Signature ==  
 +
public struct <strong>getCustomMetadata</strong> ( numeric pageID, numeric categoryID, numeric subsiteID, string inheritedTemplateList )
  
Signature
+
== 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>pageID</td>
 +
<td>numeric</td>
 +
<td></td>
 +
</tr>
 +
 +
<tr>
 +
 +
<td>&nbsp;</td>
 +
 +
<td>categoryID</td>
 +
<td>numeric</td>
 +
<td></td>
 +
</tr>
 +
 +
<tr>
 +
 +
<td>&nbsp;</td>
 +
 +
<td>subsiteID</td>
 +
<td>numeric</td>
 +
<td></td>
 +
</tr>
 +
 +
<tr>
 +
 +
<td class="required">optional</td>
 +
 +
<td>inheritedTemplateList</td>
 +
<td>string</td>
 +
<td>[Default: ] </td>
 +
</tr>
 +
 +
</table>
 +
=== Usage: ===
 +
Example 1: Get the blogID from the custom Metadata form bound to the current page:
 +
<source lang="cfm">
 +
<cfscript>
 +
    pageMeta =  application.ADF.CSData.getCustomMetadata(request.page.id);
 +
if ( StructKeyExists(pageMeta.custom, "Blogs2") AND
 +
              (StructKeyExists(pageMeta.custom.Blogs2, "blogID")) and
 +
              (LEN(pageMeta.custom.Blogs2.blogID))){
  
Parameters
+
  blogID = pageMeta.custom.Blogs2.blogID;
 +
   
 +
    }
 +
</cfscript>
 +
</source>

Latest revision as of 23:07, 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 custom metadata for the page.

Signature

public struct getCustomMetadata ( numeric pageID, numeric categoryID, numeric subsiteID, string inheritedTemplateList )

Parameters

Required Name Type Description
required pageID numeric
  categoryID numeric
  subsiteID numeric
optional inheritedTemplateList string [Default: ]

Usage:

Example 1: Get the blogID from the custom Metadata form bound to the current page:

<cfscript>
     pageMeta =  application.ADF.CSData.getCustomMetadata(request.page.id);
 	 if ( StructKeyExists(pageMeta.custom, "Blogs2") AND
              (StructKeyExists(pageMeta.custom.Blogs2, "blogID")) and 
              (LEN(pageMeta.custom.Blogs2.blogID))){

  	 blogID = pageMeta.custom.Blogs2.blogID;
     
     	}
</cfscript>