Using BSCW elements

Website folders have a built-in element system with a wiki-like [element] syntax, allowing you to include BSCW elements into your pages, e.g. a page’s last modification date, links for editing the page, a display of the page history or even entire action menus. BSCW elements have a name and may also have parameters with values. An abstract example of the BSCW element syntax,

[element name param1=True param2="A long text with spaces"]

represents the BSCW element name with two parameters, one named param1 with value True, the other one named param2 with value "A long text with spaces". Note the double quotes, which are only needed for values containing spaces. A concrete example of a BSCW element is

[element documentactions action=edit text="Change me!"]

representing the action Edit to be applied to the current document. In the Web view of an HTML document in a website folder, the BSCW elements are evaluated and the results are inserted into the page. In the above example, a clickable link labelled Change me! would be inserted into the document that would invoke the Edit action on the document itself.

Note: In the context of BSCW elements in website folders, some actions have names that differ from their usual names in BSCW. Examples are Revert Changes instead of Destroy Versions and Add Subfolder instead of Add Subsidiary Website Folder.

Even though all BSCW elements are enclosed in square brackets, you can still use square brackets in documents of a website folder as normal text. Only the string [element will be recognized as the start of a website folder element. Errors in BSCW element specifications lead to error messages inserted into the page while the rest of the page will still work as expected.

You may embed BSCW elements in arbitrary HTML text that is shown only if the evaluation of the BSCW element results in a non-empty content. In the following example

[decoration] <HTML text> [element ..] <HTML text> [/decoration]

the text between [decoration] and [/decoration] will not be shown, if the result of the BSCW element evaluation is empty.

In the following, the available BSCW elements are listed in alphabetical order. The ‘Static’ attribute tells you whether the particular element will be included in a static copy of the website folder or not (see 8.6.6 Exporting and publishing website folders). You may enter the BSCW elements directly into the source text of your website folder’s pages or use the respective drop-down menu of BSCW’s built-in HTML editor.

Click on an element’s name to have a detailed definition of its parameters displayed.

authors Inserts a list of authors of objects of the current website folder. Clicking on an author name restricts the list of objects shown in the list generated by contents to the objects generated by a specific author. Note that clicking on an author name has no effect on hierarchical lists generated by tree.

back Inserts a link that leads from inside the website folder to the first parent folder that is not a website folder.

categories Inserts a list of categories assigned to the objects of the current website folder. Clicking on a category restricts the list of objects shown in a list generated by contents to the objects with a specific category. Note that clicking on a category has no effect on hierarchical lists generated by tree.

comments Lists the comments on the current page and by default offers an input field for entering new comments, if the user has the right to enter new comments. Eventual answers to comments are not shown.

contents Inserts a list of all objects contained in the current website folder as clickable links. In case of a full-text search the list will be replaced by the search results, if no proper search result page has been defined using searchresults.

contentsmetatable Inserts a table of selected metadata of all objects directly contained in the current website folder into the current document. This contents table may be sorted by the user with respect to the metadata shown. By default, the columns of the table show name, tags and description of the objects directly contained. You may also have other metadata attributes displayed. Metadata attributes are identified by their keys. You can obtain a list of the metadata keys used in a metadata profile by selecting action  Specification  in the action menu of the metadata profile. For examples of metadata keys also see contents above.

date Inserts the current date and/or time.

documentactions Inserts a complete action menu for the current document or a direct link to a specific action.

fileupload Inserts an interaction element for uploading images to the current folder. There is to be at most one fileupload element per page.    
The interaction element consists of three buttons [Select file(s) to upload…], [Upload], [Cancel upload] and a preview domain showing the files intended for upload. The first button initiates a standard file selection dialog, the second button causes the actual uploading and the third button cancels the upload process. You may also specify files for uploading by dropping them over the [Upload] button. The files intended for uploading are shown in the preview area below the buttons.        
Note: Currently, the fileupload element is to be used for uploading image files only.

folderactions Works exactly like documentactions, but takes the current website folder as the object of reference for the action menu or the action links.

gallery Displays the image files that are contained in the current folder in form of a gallery with miniaturized previews. Image files are documents with a respective MIME type (image/jpg, image/png etc.).

history Inserts a list of the documents that were visited last as a list of clickable links.

lastmod Inserts the date and/or time of the current document’s last modification.          

lastmodby Inserts the name of the user who last modified the current document.

location Inserts the path to the current document as clickable links.

message Inserts a BSCW system message. These messages are displayed in the preferred language of the current user.

metadata Inserts the metadata of the current object as a table arranged according to the groups of the respective metadata profile and offers a button for changing the metadata. In contrast to contentsmetatable, metadata is about one single object.

search Inserts the input field for the full-text search within the website folder. The search results appear on the search results page that you have defined for the current website folder using searchresults. Without a specific search result page, the search results replace the contents list or tree that were generated using contents or tree. Using search only makes sense if you use searchresults, contents or tree at the same time, otherwise the search results will not be shown.

searchresults Specifies the appearance of the search result page that shows the results of a search in the current folder.

size Inserts an object’s size.

systembanner Inserts the system banner, by default the BSCW system banner.

tags Inserts a list of tags assigned to the objects of the current website folder. Clicking on a tag restricts the list of objects shown in a list generated by contents to the objects with a specific tag assigned. Note that clicking on a tag has no effect on hierarchical lists generated by tree.

toc Displays a table of contents of the current document consisting of headings as clickable links allowing navigation within the document.

tree Inserts a tree of clickable links showing the contents of the current website folder from top level down to the current document. In case of a full-text search the tree will be replaced by the search results when no proper search results page has been defined using searchresults.