<sb-output> is an output tag like <formoutput> or
<sqloutput>, that can be used 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 meta data 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 meta data 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.
File or directory variables
- url
- An 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.
- filename
- The file name of the file or
index.html in case of a directory.
- filesize
- The size of the file or the
index.html file in case of 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 meta data.
- type
- The content-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.
User variables
- 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.
file=path
Get information about the specified 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 used 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 whose 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 whose 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.
above
Only produce the part of the menu above the selected entry.
Above can be combined with selected or
below.
selected
Only produce the selected entry. Selected can be combined
with above or below.
below
Only produce the part of the menu below the selected entry.
Below can be combined with above or
selected.
range=from .. to
Limits the number of rows of the output to the interval between the
numeric arguments from and to. The first element is
element "0". If either argument is negative it will be counted from
the last element. Thus the last element is element "-1". If
from is empty it will default to "0". If to is empty it
will default to "-1".
sort=variable, -variable, ...
Sorts the result according to one or several variables. A "-" put
before the variable name will change the sort direction. By default
the sort order is title, filename.
path=path
Change which directory the dirs, glob and
type attributes should work on.
notitle
Include files or directories that does not have any title set.
index
Include the index.html file in directory listings. By
default the index.html file is omitted.
selected=filename | path
Make this file selected.
delimiter=html-code
The HTML code of the delimiter will be put between each row in the
output.
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.
- file=path
-
Get information about the specified 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 used 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 whose 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 whose 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.
- above
-
Only produce the part of the menu above the selected entry.
Above can be combined with selected or
below.
- selected
-
Only produce the selected entry. Selected can be combined
with above or below.
- below
-
Only produce the part of the menu below the selected entry.
Below can be combined with above or
selected.
- range=from .. to
-
Limits the number of rows of the output to the interval between the
numeric arguments from and to. The first element is
element "0". If either argument is negative it will be counted from
the last element. Thus the last element is element "-1". If
from is empty it will default to "0". If to is empty it
will default to "-1".
- sort=variable, -variable, ...
-
Sorts the result according to one or several variables. A "-" put
before the variable name will change the sort direction. By default
the sort order is title, filename.
- path=path
-
Change which directory the dirs, glob and
type attributes should work on.
- notitle
-
Include files or directories that does not have any title set.
- index
-
Include the index.html file in directory listings. By
default the index.html file is omitted.
- selected=filename | path
-
Make this file selected.
- delimiter=html-code
-
The HTML code of the delimiter will be put between each row in the
output.
sb-if
sb-login
sb-menu
sb-output
"=> >
sb-if
sb-login
sb-menu
sb-output
Example
sb-if
sb-login
sb-menu
sb-output
"=> >
sb-if
sb-login
sb-menu
sb-output
|