Add SPNavigation header and link programmatically
In the user interface you can choose if you want to add a heading or a link node to the navigation.
Notice that my heading has no URL, but when you try programmatically to add the SPNavigation string.Empty is not allowed. So I used the blog Add SPNavigation Heading without link functionality.
Here is my implementation.
STEP 1:Add a method MakeHeaderNode and MakeLinkNode to a new class. It is the property NodeType that makes the magic happen.
STEP 2:
I hope this was useful.
Notice that my heading has no URL, but when you try programmatically to add the SPNavigation string.Empty is not allowed. So I used the blog Add SPNavigation Heading without link functionality.
Here is my implementation.
STEP 1:Add a method MakeHeaderNode and MakeLinkNode to a new class. It is the property NodeType that makes the magic happen.
STEP 2:
I hope this was useful.
Reacties
Een reactie posten