ContentSelector.GetContent
Use this method to execute a Content Selection pipeline and return the resulting content in a SimpleList object.
Definition
Function GetContent(dictCSFContext As IDictionary,) As ISimpleList
Parameters
dictCSFContext
A global context dictionary with a configuration for an instance of a CSF application. The dictionary contains global objects and configurations used by the ContentSelector object. At a minimum, the dictionary must contain the Pipeline
key so that the ContentSelector object knows which pipeline to execute.
Return Values
If this method completes successfully, it returns a reference to a SimpleList object that contains the selected content. The elements of the SimpleList object are HTML or XML strings.
Error Values
This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
Note
- This method can also return an error returned by the invoked pipeline.
Remarks
The ContentSelector object reads the Pipeline
key of the passed in dictionary object to find the pipeline object to invoke. It copies the values of the dictionary passed to it into a new dictionary. The new dictionary is passed to the pipeline as the pipe Context dictionary. An empty dictionary is created and passed as the Order dictionary for the pipeline. The ContentSelector object adds a reference to itself under the ContextProfile
key in the pipe Context dictionary.
When pipeline execution has completed, the ContentSelector object looks for the key _formatted
in the Order dictionary, and returns the list assigned to that key as the return value. If the list assigned to the _formatted
key does not exist, an empty list is created and returned. The self-reference in the pipe Context dictionary is removed to prevent a circular reference. References to the Order and Context dictionaries are added to the ContentSelector object before it returns, giving the page access to the values written into those dictionaries by the pipeline.
Example
For example code, see the sample in ContentSelector Object.