About Document Types
What is a document type?
A Document Type is just that - the type of document. Technically speaking, it denotes what data format is used to define the document.
For example, suppose you have site of books reviews. Your site may have two different types of documents: Standard and Book Review.
The Book Review type would probably allow you to insert specific fields (ex. Book Author, Book Title, Book Rating), whereas the Standard type would simply give you a blank page to start writing in.
The difference in format is easy to see:
- The Book Review type uses a data format which includes Book Author, Book Title and Book Rating.
- The Standard type uses a data format which includes just Text.
When and why to use document types?
When you create a new document, you will have to assign it a document types. Choosing the correct document type will not only allow your document to be viewed using the correct style template, but it may also be helpful to the user when conducting a search, or when using any other site specific tools.
In the book review example, it’s easy to figure out which document type to use:
- If you are inserting a new book review, choose Book Review from the pull down menu.
- If you are inserting any other type of page, let’s say an “About Us” page, then choose Standard.
Most likely, the site would have a “Find a Book Review” tool. In this case, if you hadn’t set your document type to Book Review, then the system would ignore your document while performing the search - and your users would have a hard time finding that book review.
Can I modify a document type after the document has been created?
That depends on whether or not the document types are compatible. sWord will not let you change to a document type which has an incompatible data format - that is which contain fields of information which don’t match up exactly.
If the types are compatible, you can change the document type via the Document Properties Manager.
Example of incompatibility
If we look at the book review example from above, with two document types - Book Review and Standard - it should be clear that the two types are incompatible.
Well, think about it: if you have a Standard type document which contains the field Text, and you converted it to a Book Review type document, which doesn't contain any Text field... what then? It should be clear that the two types are incompatible.
sWord will not allow the conversion.
Example of compatibility
Let’s assume that the Book Review site has three document types instead of two:
- A Book Review for Boys type, which uses a data format including Book Author, Book Title and Book Rating.
- A Book Review for Girls type, which uses a data format including Book Author, Book Title and Book Rating.
- A Standard type, which uses a data format including just Text.
Since both the Book Review for Boys and Book Review for Girls types contain the same data format, the only real difference between the two would be in how they appear (maybe boys have a blue background and girls a yellow one).
That means that the data format for these types are compatible, despite how different the pages may or may not appear.
sWord will allow conversion between Book Review for Boys and Book Review for Girls.