ListDocuments20 Class Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Lists information about documents from a category in a table. The content of the document will not be displayed. The ListDocuments20 class acts as the underlying engine for the List documents 2.0 AS component.
Inheritance Hierarchy

SystemObject
  ContentStudio.SiteCodeBase
    ContentStudio.Site.ActiveScriptingActiveScriptingBase
      ContentStudio.Site.ActiveScriptingDocumentBase
        ContentStudio.Site.ActiveScripting.DocumentListDocuments20

Namespace: ContentStudio.Site.ActiveScripting.Document
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public sealed class ListDocuments20 : DocumentBase

The ListDocuments20 type exposes the following members.

Constructors

  NameDescription
Public methodListDocuments20
Constructs a new instance of the ListDocuments20 class that writes to the default response stream
Public methodListDocuments20(Stream)
Constructs a new instance of the ListDocuments20 class that writes to the supplied stream
Top
Properties

  NameDescription
Public propertyBackwardsComponentCompatibilityMode
Sets or gets a value that indicates whether the code runs in backwards compatibility component mode. The default value is false.
(Inherited from ActiveScriptingBase.)
Public propertyBorder
Sets or gets the table border width. The default value is zero (no border)
Public propertycellPadding
Sets or gets the table cell padding. The default value is 3.
Public propertycellSpacing
Sets or gets the table cell spacing. The default value is zero (no cell spacing)
Public propertyColProperties
Sets or gets the column properties. The default value is an empty string.
Public propertyComponentName
Gets the name of the component
(Overrides ActiveScriptingBaseComponentName.)
Public propertyConformance
Gets a value which specifies which type of code a component can generate.
(Overrides ActiveScriptingBaseConformance.)
Public propertyDateFormat
Sets or gets the date format string. For more information on the different time format strings, see the System.Globalization.DateTimeFormatInfo class documentation. The default value is "g" which displays a combination of the short date and long time patterns, separated by a space.
Public propertyDefaultSortOrder
Sets or gets the default sort order. The default value is DocumentComponentSupport.DocListSortorder.DocumentNameDesc
Public propertyElementType
Gets a value which specifies the type of outer element the component generates.
(Overrides ActiveScriptingBaseElementType.)
Public propertyEncoding
Sets or gets the encoding the component uses. The default encoding is the UTF8 encoding without byte order mark.
(Inherited from ActiveScriptingBase.)
Public propertyheaderClassName
Sets or gets the class name of the header column. The default value is an empty string (no class name is used).
Public propertyInsertedDocuments
Gets the number of documents that are listed. Before Invoked is called, the value is -1.
Public propertyLocation
Sets or gets the category to fetch documents from. This field is required but the default value is zero (not set)
Public propertyNoDocumentLabel
Sets or gets the message to show when no documents are found. The default value is "No documents found"
Public propertyNumber
Sets or gets the maximum number of documents to list. A zero means that all documents are listed. The default value is zero (list all documents)
Public propertyPTID
Sets or gets an optional PTID. The default value is zero (no optional PTID).
Public propertystartNumber
Sets or gets the number of documents to skip before displaying the first document according to the current sorting order. The default value is zero (display from the first document)
Public propertyTableAttributes
Sets or gets the attributes for a table. The default value is an empty string (no table attributes are used).
Public propertyTableCaption
Sets or gets the caption for a table. The default value is an empty string (no caption is used).
Public propertyTableSummary
Sets or gets the table summary. The default value is an empty string (no table summary is used)
Public propertyTarget
Sets or gets the target attribute for a link. The default value is an empty string (no target attribute is used).
Public propertytextClassName
Sets or gets the class name that is applied to all columns except the title column. The default value is an empty string (no class name is used).
Public propertytitleClassName
Sets or gets the class name of the title column. The default value is an empty string (no class name is used).
Public propertyWidth
Sets or gets the table width. The default value is an empty string (unspecified width)
Top
Methods

  NameDescription
Public methodAddColumn
Adds a column to the table displaying the document information
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInvoke
Invokes the component and writes its content into the specified stream
Public methodToString (Inherited from Object.)
Top
Remarks

To use this class, create an instance of this object, set up the properties and call the Invoke method with an appropriate set of parameters. This class can throw exceptions, thus your code should be wrapped within try/catch statements in order to avoid the entire page to crash. This class generates inline code, thus you must wrap it into a block element to make the page validate according to the HTML/XHTML regulations. The generated code is fully HTML/XHTML strict compatible.
Examples

The following code snippet shows how to use ListDocuments20
C#
ListDocuments20 list = new ListDocuments20();
//CategoryID
list.Location = 547;
list.AddColumn(ListDocuments20Dev.Documentfield.Title, "Title");
list.AddColumn(ListDocuments20Dev.Documentfield.ID, "Document id");
list.AddColumn(ListDocuments20Dev.Documentfield.CreatedBy, "Created by");
list.Invoke();
Visual Basic
Dim list As New ListDocuments20()
' CategoryID
list.Location = 547
list.AddColumn(ListDocuments20Dev.Documentfield.Title, "Title")
list.AddColumn(ListDocuments20Dev.Documentfield.ID, "Document id")
list.AddColumn(ListDocuments20Dev.Documentfield.CreatedBy, "Created by")
list.Invoke()
See Also

Reference