Component Recite_Tree

Functions related to using the JavaScript tree component in Recite CMS

Method: Recite_Tree.GetDefaultOptions

<static> {Object} Recite_Tree.GetDefaultOptions()

Get default options to use for building a tree. This should be used as a starting point when a tree needs to be loaded.

  • Returns:

    • Object

Method: Recite_Tree.GetId

<static> {String|Integer} Recite_Tree.GetId(id)

Retrieve the ID number from a tree-friendly internal ID

  • Parameters:

    • String id - The tree-friendly ID to extract the real ID from

  • Throws:

    • String

      If the node isn't in a valid format

  • Returns:

    • String|Integer The real ID

Method: Recite_Tree.SetId

<static> {String} Recite_Tree.SetId(widgetId, id)

Get a tree-friendly ID based on the widget ID and the real ID

  • Parameters:

    • Integer widgetId - The ID of the widget this ID is being used for

    • String|Integer id - The real ID

  • Returns:

    • String The tree-friendly ID