C++: long vtiPutWebStructure(BSTR pszModifications);
VB: vtiPutWebStructure(Modifications as String) as Long
Description
Provides a way to add navigational structure to the current web, just as a user might with the FrontPage Explorer’s Navigation View.
Return Value
0 for failure
1 for success
Parameters
Modifications is a newline-delimited list of records requesting additions to the structure tree maintained by the web and displayed in the FrontPage Explorer’s Navigation View. If any of the modifications fail, the entire list is rejected, the method returns 0 to indicate failure, and the web is unmodified. Each modification record contains four fields separated by commas:
ElementID,URL,Label,ParentID
The URL field is a web-relative path to the page being added, which must already exist in the FrontPage web. The Label field is a string that will be displayed on the corresponding node in the Navigation View, and on automatically-generated links to the page represented by the URL parameter.
Each node in the structure tree for the current web has a unique ElementID. If you are creating a node, no ID has been assigned to it, so you should provide some small positive integer to serve as a temporary identifier. This temporary identifier can be referred to by other modification records in the ParentID field.
There are two reserved ID numbers: 0 represents the virtual root node of the structure tree, and 1000 represents the home page. You can use 0 as the ParentID to create top-level pages, and 1000 as the ParentID to create children of the home page.
Here’s an example of how you could add two pages as children of the home page:
1,page1.htm,First Child,0
2,page2.htm,Second Child,0