w2sidebar.set

Finds sidebar node with id and extends it with node object.
set([parent], id, node)
parent string, id of the parent node (optional)
id string, id of the sidebar node
node object, new sidebar node object
Returns boolean.

Description

The id argument is the id of the sidebar node used during its creation. Nodes can be nested. Each node has .nodes array that holds its children. The sidebar node object is not replaced with node, but extended by it. If you call this method during run-time, you will need to call .refresh() method. If node was successfully extended the method will return true, otherwise false.
You can optionally specify parent, which is an id of the parent node. If parent is specified then it will limit the search scope to that parent and its subnodes.
If you defined the object in the following way: You can get sidebar node:

User Comments

comments powered by Disqus