Add Method (NavigationNodes Collection)

See Also         Example         Applies To

Adds a new file to the list of available items in the NavigationNodes collection. Use this method to add a new file to the navigation structure. For more information on using navigation nodes, see the RootNavigationNode property for the Web object, or the Children property for the NavigationNode object.

Syntax

expression.Add(Url As String, NodeLabel As String, uModType As FpStructModType, [LeftSibling])

expression   An expression that returns a NavigationNodes collection object.

Url   Required String. A string that contains the path for the Web server where the file will be stored. This can be any absolute URL, such as http://web server or file://file system for disk-based webs.

NodeLabel   Required String. A string of text used to identify the NavigationNode object when viewing the navigation structure in Navigation view. The NodeLabel argument is used only as an aid to identification.

uModType   Required FpStructModType. The possible settings for the node are shown in the following table.

Argument Value Description
FpStructBaseOnSibling 0 Use this setting if you want to add a new node to the right of the node designated in the left sibling argument.
FpStructLeftMostChild 1 The leftmost node in the current navigation structure.
FpStructRightMostChild 2 The rightmost node in the current navigation structure.

LeftSibling   Optional Variant. An index into the NavigationNodes collection. It can be either a string that represents a URL, or a number that represents a node in the collection.

Remarks

Adding a new file onto the Web server (using the WebFiles.Add method) doesn't imply that you are automatically introducing the file into the navigation structure. A NavigationNode object must be created separately for the file. To create a new NavigationNode object, use the Add method for the NavigationNodes collection.

Note   When a template is used to create a new web, navigation nodes are automatically created for the files that have been added to the web by the template.