Introduction to Folder Scripting
Folder scripts are created by administrators to allow users to quickly generate an initial folder structure for a project, case or job. They are useful when folder structures are commonly created along identical lines. The template folder allows administrators to create a folder structure, set rules regarding uploaded files such as required tags, copy files into the folder structure and set a default view for each folder.
Here is a simple example:
<Collection name="Correspondence">
<properties>
<comment proptype="string" xmlns="DAV:">Folder to contain all incoming correspondence</comment>
<viewcolumns xmlns="www.docmoto.com/ns/2006/docmoto/" proptype="xml">
<columnlist>
<property tag="DAV:/displayname"/>
<property tag="http://ns.exiftool.ca/File/1.0//FileType"/>
</columnlist>
</viewcolumns>
<Document name="PressRelease.pdf" source="/DocMotoConfig/Templates/Project.template.xml.files/PressReleaseTemplate.pdf">
<properties>
<comment proptype="string" xmlns="DAV:">Empty document needs populating by manager.</comment>
</properties>
</Document>
</properties>
</Collection>
The above example will create a folder, with a comment describing the usage of the folder. When displayed to the user there will be two columns visible and it will contain a pdf document.
Creating a Template
Templates are built using the <Collection> element. Each <Collection> is a folder, and may then contain further <Collection>'s and Documents. Each folder can be customised regarding meta tags for files and folders contained within it and the default view the user will see in the folder pane.
<!ELEMENT Collection (name)>
Attribute Definitions:
name ::= The name of the folder. This name will be displayed to the user within the folder pane. It is possible to use XSLT to generate the contents of properties.
Example Useage:
<Collection name="Example">
<properties>
<comment proptype="string" xmlns="DAV:">An example Collection</comment>
</properties>
</Collection>
To extend the collection element further, meta tags can be set within a <properties> tag.
Example - Syntax for setting the Comments Meta Tag
Comments ::= A description of the folder which can be seen in the information panel
<!ELEMENT comment (proptype, xmlns)>COMMENT</comment>
Attribute Definitions
proptype ::= The type definition of the comment, generally "string"
xmlns ::= (DAV) namespace of comment
Example - Syntax for setting the Default View Meta Tag
View Columns ::= The default column view for the folder which can be seen in the folder pane
<!ELEMENT view_columns(xmlns, proptype)>
<columnlist>
<property (tag)/>
</columnlist>
</viewcolumns>
Attribute Definitions
xmlns ::= (www.docmoto.com/ns/2006/docmoto/) namespace of the property
proptype ::= (XML) type of property
tag ::= The name of the metatag.
