MenuCreatorGetDocumentTree Method (ConnectionId, SessionId, DocumentId, DateTime, Int32) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Returns a complete menu in a flat structure with parent menu and all its children. If no DateCriteria is supplied then only the currently valid menus are returned else the menus valid at the supplied date are returned. The "Insert simple menu" component uses this method as input

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

public string GetDocumentTree(
	ConnectionId connectionId,
	SessionId sessionId,
	DocumentId documentId,
	DateTime dateCriteria,
	int sortOrder
)

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
The document that acts as a starting point of the tree
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.
sortOrder
Type: SystemInt32
Determines how the tree is sorted. 0 = by the level and the defined order among siblings; 1 = by the defined sibling order.

Return Value

Type: String
This method returns the following xml document syntax
<root>
  <status>0</status>
  <statustext>Success</statustext>
  <documents>
     <document level="1" elementid="3489" elementname="MyDocument" parentelementid="3489" child="1" />
     <!-- more document elements can follow -->
  </documents>
</root>
Exceptions

ExceptionCondition
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