MenuCreatorDocumentParentTree Method (ConnectionId, SessionId, DocumentId, DateTime, Boolean) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Returns a collection of ancestor documents for a document. This data is used as input for the InsertDocumentTreePath component or any other code that needs to create a bread-crumb path to a document.

Namespace: ContentStudio.Document.Menu
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public string DocumentParentTree(
	ConnectionId connectionId,
	SessionId sessionId,
	DocumentId documentId,
	DateTime dateCriteria,
	bool sortAsc
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
documentId
Type: ContentStudio.DocumentDocumentId
A document whose ancestors should be listed.
dateCriteria
Type: SystemDateTime
A DateTime that is compared with the publish date of the listed documents. Can be used when previewing documents in time. Pass MinValue to use the current date.
sortAsc
Type: SystemBoolean
Set to true to have the list sorted from the document to its root parent, false to start with the root document in the tree.

Return Value

Type: String
Xml

This method returns the following xml document syntax
Starting with version 5.3 this method also returns the attribute userdata

<root>
  <status>0</status>
  <statustext>Success</statustext>
  <document documentid="1146" parentid="1146" documentname="Name" userdata="data"/>
  <document documentid="1022" parentid="1146" documentname="Name" userdata="data"/>
  <!-- more document element can follow -->
</root>

The user data attribute contains the user data contained with the document. This data can be specified by the document editor and can be used to tag the menu item with useful data such as an image Url or an alternate text. The source of this data is the ElementImage database field in the dbo.tbl_modules_content table.

Exceptions

ExceptionCondition
CSInvalidSessionExceptionThe session is invalid
CSDocumentNotFoundExceptionThe document could not be found
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

All authenticated users and the anonymous use can call this method. However, only the document that the caller can BROWSE is returned.
See Also

Reference