Table of Contents
Introduction
Templates
Navigation
SiteBuilder Tags
Examples
References
|
<sb-output> ... </sb-output>
|
 |
<sb-output> is defined in the SiteBuilder tags module.
<sb-output> is an output tag like <formoutput> or
<sqloutput>, that can be user to get SiteBuilder specific
information. All attributes that can be used with
<formoutput> can also be used with <sb-output>. It
can either be used to get metadata and information about files or to
get information about the current user.
When the <sb-output> tag is used to get information about
files or directories it uses the same attributes as the
<sb-menu> tag. It is possible to get information of all files
or directories listed in a menu file. For directories the metadata is
fetched from the index.html file. Since the
index.html is treated as the contents for the directory
itself it will not be included in any listing of files within a
directory.
One file in a list of files or directories might be selected. This
is usually the current file, but in the case of directories it might
be any directory that is part of the path to the current file.
The variables that <sb-output> handled when listing files
or directories is:
- url
-
A URL to the file or directory.
- selected
- Whether this file is the current file or if
this directory is a directory within the path to the current file.
Only one entry will be selected.
- title
- The title of the file or index.html
file in a directory.
- description
- The description of the file or
index.html file in a directory.
- keywords
- The keywords of the file or
index.html file in a directory.
- language
- The language of the file or
index.html file in a directory. The language of the
document, from the metadata.
- type
- The type of the file or directory for a
directory.
- type-img
- A URL to the icon for that type of file.
- status-img
- A URL to the icon representing the status
of the file or index.html file in a directory. This is the
same status icon as used by the Content Editor.
- permission
- The users permission on to the file or
directory. Is either read or write.
- content-editor
- A URL to the Content Editor, focusing
on the file or index.html file in a directory.
- workarea
- The name of the workarea.
- workarea-id
- The unique id of the workarea. For use
when doing web applications.
The variables available when getting information about the current
user is:
- user-id
- The unique user id. For use when doing web
applications.
- user-name
- The user's name, as used at the login
prompt.
- full-name
- The user's full name.
|
|
Attributes
- user
-
Get information about the current user. Cannot be combined with other
attributes.
- file
-
Get information about the current file. Cannot be combined with other
attributes.
- menu=filename
-
Get information about files or directories listed in a menu file with
this name. If there are no menu file in the current directory and a
dir, type or glob attribute is
present, a directory listing will be read instead. If not, the tag
will search for a menu file with this name in the parent directory and
its parent directory until a suitable menu file is found or all
directories has been tried.
- history
-
Get information about all directories in the path, including the
current directory.
- dirs
-
Get information about all directories in the directory specified by
the path or the current directory. Can be combined with the
glob and type attributes as well as the
menu attribute.
- glob=glob-pattern,glob-pattern,...
-
Get information about files who's name match one of the glob patterns.
It searches for files in the directory specified with the
path attribute or the current directory. Can be combined
with the dirs and type attributes as well as the
menu attribute.
- type=glob-pattern,glob-pattern,...
-
Get information about the files who's content type match one of the
glob patterns. It searches for files in the directory specified by the
path attribute or the current directory. Can be combined
with the dirs and glob attributes as well as the
menu attribute.
- path=path
-
Change which directory the dirs, glob and
type attributes should work on.
Example
|