Share via


NavigationNodes.Add Method

SharePoint Designer Developer Reference

Adds a new file to the list of available items in the NavigationNodes collection.

Syntax

expression.Add(Url, NodeLabel, ModificationType, LeftSibling)

expression   Required. A variable that represents a NavigationNodes collection.

Parameters

Name Required/Optional Data Type Description
Url Required String Specifies 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 Web sites.
NodeLabel Required String Specifies 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.
ModificationType Required StructureModificationType Specifies the node modification type.
LeftSibling Optional Variant Specifies 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.

Return Value
NavigationNodes

Remarks

Use this method to add a new file to the navigation structure. For more information about using navigation nodes, see the RootNavigationNode property for the Web object, or the Children property for the NavigationNode object.

Adding a new file to the Web server (using the Add method for the WebFiles object) doesn't imply that you are automatically introducing the file into the navigation structure. You must create a NavigationNode object 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 site by the template.

See Also