File types
A SiteBuilder site handles different file types. The file types are
presented to the user as a string describing the file type and an icon
when doing directory listings. It is possible to use the same icons in
file listings done in RXML, by using the <sb-output> tag.
File types have handlers, that are plugins that handle upload,
download and viewing of the file. It is important that each file type
get the right handler, the text handler would for example not
work very well with an image file. For new file types the
default handler should be used.
The handlers are:
- default
-
For any file type that cannot be handled by other handlers. Only the
basic SiteBuilder functionality will be available for files handled by
the default handler.
- image
-
For handling image files.
- html
-
For handling HTML files.
- text
-
For handling any text file. It will be possible to edit with the
Content Editor.
- menu
-
For handling menu files, that should have the content-type
sitebuilder/menu.
- template
-
For handling template files, that should have the content-type
sitebuilder/template.
File types are configured with the File types button
under the configuration. For each file type the following
data can be configured:
- Content type
-
The MIME content type of the file type. If the content type begins
with roxen/ the file will not be handled by SiteBuilder but
rather sent unmodified to Challenger. That means that Challenger's
file extension modules will be used to handle the file. It also
means that the correct file extension must be used.
- Name
-
The name of the file type. Will be presented to the user.
- Image
-
The image to display in the content editor for this file type.
- Handler
-
Which handler to use for this file type.
- Download
-
Whether it should be possible to download this file type or if it
should only be handled through the interface in the content editor.
- Parse
-
Whether this type of files should be run through the template system
and the RXML parser. Will only have effect if the handler supports
parsing.
- Extensions
-
The file extensions of this file types. Is used to automatically
determine an appropriate file type when uploading a new file. It is by
no means necessary for files to have these extensions.
- Default File
-
This is a path to either a file or directory. The file, or files, will
be used as default files in the Edit new file wizard. It is
necessary to have default files to be able to create new files of the
file type from within SiteBuilder.
|