MenuCreatorDocumentParentTree Method (ConnectionId, SessionId, DocumentId, 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)

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


Type: ContentStudioConnectionId
A value that identifies the web site
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
Type: ContentStudio.DocumentDocumentId
A document whose ancestors should be listed.
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

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

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

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.


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