Setting File System Content Bridge Properties

The File System Content Bridge uses properties to associate source content with a content collection and control how that source content appears in a content collection. Depending on the software that you have purchased and how your system administrator has configured your NXT installation, you may have access to several different content bridges.

The File System Content Bridge, like the other content bridges, has a set of general properties that pertain to all collection builder nodes as well as properties that only pertain to the File System Content Bridge. Figure 1 shows in the properties pane the distinction between general content collection properties and those inherent to the content bridge. You will need to provide both, the general content collection information as well as the following information for the File System Content Bridge collection builder:

Figure 1. File System Content Bridge Properties Window

Sort File Property

By default File System Content Bridge organizes/orders the documents, files, and folders in each directory in an increasing alphanumerical order based on the file system name of the document.

Occasionally you may need to sort documents in a different or specific order. You can customize the ordering of your files (documents and folders) by creating a sort file. This file is merely a text file that contains the full names of the files that you will publish listed in the order by which you want to sort. The Sort File property defines the name of this file. You can name this file whatever you want, including the extension. As for the location of this file, you must place the sort file within the folder for which it is defining the sort order.

warning icon Because the extension of a file determines whether or not the File System Content Bridge includes that file in the resultant content collection, you should use a file extension for your sort file that is not a known MIME-type. If you do use a known MIME-type as your sort file extension the content bridge will include your sort file in your content collection (which is probably not what you would want). The default extension is .srt and does not coincide with any known MIME-types.

A sort file only defines the sort order of the immediate children (documents and folders) of a given parent. You will need to create a separate sort file, with the same name in each folder you want to customize the sort order. the File System Content Bridge orders any files that you do not include in the sort file but reside in the respective directory, alphanumerically following the sort-file-ordered files. The File System Content Bridge warns you if you include a file name in a manifest that you are not publishing or that is not present in the directory.

The easiest way to create an initial sort file is to do the following:

  1. Open a command prompt and set the directory to that which you want to modify the sort order
  2. Type the following command at the prompt (after changing your directory):

    dir /B > mysortfile.srt

    and hit "Enter"
  3. Open Windows Explorer, navigate to that same directory and you will see the mysortfile.srt file
  4. Open mysortfile.srt with any text editor (NotePad works fine) - You will see the names of the files in that folder in their current sort order. Table 1 shows a sample sort file
  5. Modify the sort order as you desire
  6. Save the changes...and you are done

Table 1. Sort File
Initial Customized
aa.html
ac.html
ar.html
as.html
country.html
folder1
folder2
images
mysortfile.srt
xq.html
zh.html
		
folder1
country.html
aa.html
ac.html
ar.html
as.html
folder2
xq.html
zh.html
images
mysortfile.srt
		

When you build this content collection the File System Content Bridge will use that mysortfile.srt file to appropriately order the files in that folder. You can run the same process for each directory for which you want to define the sort order.

Root Directory Property

Although the Library Manager lists the Root Directory property in the General property section, this property is inherent to the File System Content Bridge. The Root Directory property, as the name purports, defines the root directory of documents included (published) in the content collection. This directory can be on a local drive, a mapped network drive, or on CD or DVD. Clicking on the button enables you to browse to the root directory on your file system. Or, you may type the path into the property field directly. The File System Content Bridge does not populate this property with a default value.

When the NXT build system builds a content collection with the File System Content Bridge, it begins at the root directory and traverses all of the files and the descendants (sub-directories) of each directory it encounters. This traversal ends for a branch in the file system hierarchy when the directory has only document child nodes or empty folders. You can set publishing rules according to content (file) type to dictate what NXT publishes. When you set a publishing rule that indicates a file type should not be published, NXT excludes that file from the content collection.