MenuCreatorGetWebTree 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 complete menu in a hierarchical structure with parent menu and all its children.

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

public string GetWebTree(
	ConnectionId connectionId,
	SessionId sessionId,
	DocumentId documentId,
	bool useRoot
)

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.
useRoot
Type: SystemBoolean
If this parameter is true this method returns a tree that starts with the ultimate tree root regardless of the position of the passed in DocumentID. If the parameter is false the returned tree starts with the passed in document.

Return Value

Type: String
This method returns the following xml document syntax
<cs_tree>
    <document level="1" children="1" leveltext="">
        <field name="elementid">1146</field>
        <field name="elementname">:root:</field>
        <field name="parentelementid">1146</field>
        <field name="categoryname">Webbsidor</field>
        <field name="categoryid">0</field>
        <field name="child">1</field>
        <document level="2" children="1" leveltext="1">
            <field name="elementid">1022</field>
            <field name="elementname">Startsida</field>
            <field name="parentelementid">1146</field>
            <field name="categoryname">Webbsidor</field>
            <field name="categoryid">0</field>
            <field name="child">1</field>
            <document level="2" children="0" leveltext="1.1">
                <field name="elementid">10522</field>
                <field name="elementname">Undersida</field>
                <field name="parentelementid">1022</field>
                <field name="categoryname">Webbsidor</field>
                <field name="categoryid">0</field>
                <field name="child">0</field>
            </document>
        </document>
    </document>
</cs_tree>
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.
Remarks

The "Web tree" component uses this method as input.
See Also

Reference