 |
 |

Using metadata
What is metadata?
"Metadata" is data about data - in ewok it is additional data that can be stored
for files and directories separate to their content. Metadata is useful both for
extra information about the item (e.g. its title or nominal owner), and for options
that affect the way ewok handles the item (e.g. what kinds of text markup to apply
to a file, the default template to use for a directory, etc.).
Metadata is accessed and edited via the 'meta' links and the 'Metadata' button
(for the current directory) in the ewok file manager, or via the 'Meta' button
when editing a document.
Metadata is also used for storing user preferences, accessed from the username
link in the top-right corner of the file manager.
Metadata inheritance
Metadata can be 'inherited' in ewok in two ways. First, directory metadata items
can be explicitly marked as 'inheritable' when the metadata is defined (see
Customising metadata), so that those items apply
to subdirectories as well. For most directory metadata items this makes sense.
For example, an 'owner' setting on a directory should probably by default apply
to subdirectories as well. A few items, like directory titles, apply only to
the directory itself, and therefore shouldn't be inherited.
Second, where an (inheritable) metadata item is defined for both a directory
and a file, the file will inherit the directory value for that item if undefined.
ewok directory metadata
The following are ewok system metadata items, used to control how ewok treats this
directory or the objects it contains:
- template: the named template to be used for pages in this directory
- fm_header_color: color to use for ewok file manager header for this directory
- auto_contents: if true, default to creating automatic contents sections
for files in this directory
- escape_html: if true, html-escape '<' and '>' characters (useful unless you
want to use explicit html in your pages)
- markup_bold: if true, format text contained in asterisks (*text*) as
strong (usually displayed as bold in graphical browsers)
- markup_italics: if true, format text contained in underscores (_text_) as
emphasised (usually displayed as italics in graphical browsers)
- markup_links: if true, formats URLs, email addresses, and labelled links
(see Link) as hypertext links
- markup_heading_anchors: if true, create an HTML anchor of the form
<a name="headingtext"> for each heading
- allow_syntax: (requires 'admin' privilege) default syntax allowed for files in
this directory - Embperl allows embedded perl, Text does not
- delete_initial_heading: (requires 'templates' privilege) delete the first
<h1> or <h2> heading from the page (typically to use it in a template)
The following informational directory metadata items are defined in the development
version of ewok as examples, to be used in templates as required:
- owner: the nominal owner of the directory (username or email address, such
as you would want to use in Feedback links in footers)
- title: a title for the directory, used anywhere you need a title (e.g. on
automatic index pages, breadcrumb link titles, etc.)
- short-title: a short title for the directory, used anywhere the regular title
might be too long (e.g. in navigation sidebars, breadcrumb link titles, etc.)
- file_up: the logical parent or 'contents' file for the current directory
ewok file metadata
The following are ewok system metadata items, used to control how ewok treats this
file:
- redirect: this file should redirect to the URL specified
- auto_contents: if true, create an automatic headings contents sections
for this file
- escape_html: if true, html-escape '<' and '>' characters (useful unless you
want to use explicit html in your pages)
- markup_bold: if true, format text contained in asterisks (*text*) as
strong (usually displayed as bold in graphical browsers)
- markup_italics: if true, format text contained in underscores (_text_) as
emphasised (usually displayed as italics in graphical browsers)
- markup_links: if true, formats URLs, email addresses, and labelled links
(see Link) as hypertext links
- markup_heading_anchors: if true, create an HTML anchor of the form
<a name="headingtext"> for each heading
- allow_syntax: (requires 'admin' privilege) default syntax allowed for files in
this directory - Embperl allows embedded perl, Text does not
- delete_initial_heading: (requires 'templates' privilege) delete the first
<h1> or <h2> heading from the page (typically to use it in a template)
The following are hidden system metadata items maintained by ewok but available to
templates:
- create_dtm: the date and time the file was created
- creator: the user (username) who created the file
The following informational file metadata items are defined in the development
version of ewok as examples, to be used in templates as required:
- owner: the nominal owner of the file (username or email address, such
as you would want to use in Feedback links in footers)
- title: a title for the file, used anywhere you need a title (e.g. on
automatic index pages, breadcrumb link titles, etc.)
- short-title: a short title for the file, used anywhere the regular title
might be too long (e.g. in navigation sidebars, breadcrumb link titles, etc.)
- keywords: keywords for use in HTML <META> tags
- description: descriptive text for use in HTML <META> tags
- version: versioning information for this file
- file_up: the logical parent or 'contents' file for this file
- file_prev: the previous file in a sequence, for a "Previous Page" link
- file_next: the next file in a sequence, for a "Next Page" link
|
 |