You can add items to the content repository using the tags described in the Development, Testing and Debugging with the SQL Repository chapter. For a more scalable method of adding items to the repository, see the Repository Loader chapter.

For example, the following three add-item tags:

  1. Create a book_folder item named /.

    <add-item item-descriptor="book_folder" id="folder:/">
        <set-property name="folderPath" value="/"/>
    </add-item>

  2. Create a subfolder of / named foo, with a path of /foo.

    <add-item item-descriptor="book_folder" id="folder:/foo">
        <set-property name="parentFolder" value="folder:/"/>
        <set-property name="folderPath" value="/foo"/>
    </add-item>

  3. Create a book item titled bar, with a path of /foo/bar.

    <add-item item-descriptor="content" id="content:/foo/bar">
        <set-property name="parentFolder" value="folder:/foo"/>
        <set-property name="filePath" value="/foo/bar"/>
        <set-property name="title" value="bar"/>
    </add-item>

 
loading table of contents...