AddLinkBar Method
Returns a NavigationNode object that represents a link bar.
expression.AddLinkBar(NodeLabel, ModificationType, LeftSibling)
expression Required. An expression that returns a NavigationNodes collection.
NodeLabel Required. A String that represents the label or name of the link bar.
ModificationType Required. An FpStructModType constant that represents the structure of the link bar.
FpStructModType can be one of these FpStructModType constants. |
fpStructBaseOnSibling Base the link bar on its closest sibling node. |
fpStructLeftmostChild Base the link bar on its leftmost child node. |
fpStructRightmostChild Base the link bar on its rightmost child node. |
LeftSibling Optional. A Variant that represents the left sibling of the node. This value is used to locate the new link bar in the hierarchy.
Remark
The new node will not appear in the link bar. Only the node's children will appear in the link bar.
Note The new link bar must be added to the structure before child nodes can be added to it.
Example
The following example creates a new link bar that is based on its sibling in the hierarchy of navigation nodes.
Sub NewLinkBar()
Dim objApp As FrontPage.Application
Dim objNavNodes As NavigationNodes
Dim objNavNode As NavigationNode
Set objApp = FrontPage.Application
Set objNavNodes = objApp.ActiveWeb.AllNavigationNodes
'Reference a node to use in the method.
Set objNavNode = objNavNodes.Item(1)
'Create new link bar based on sibling.
objNavNodes.AddLinkBar NodeLabel:="New link bar", _
ModificationType:=fpStructBaseOnSibling, _
LeftSibling:=objNavNode
'Apply navigation structure so node will appear.
objApp.ActiveWeb.ApplyNavigationStructure
End Sub