Adding Admin Tools

(Difference between revisions)
Jump to: navigation, search
m (Admin Tool parameters)
m (indentation of syntax)
Line 2: Line 2:
 
Tools can be given parameters which are automatically appended to the generated tool buttons. Parameters are set using the property ''admintoolhandler-args'' and may have the following syntax.
 
Tools can be given parameters which are automatically appended to the generated tool buttons. Parameters are set using the property ''admintoolhandler-args'' and may have the following syntax.
  
  Syntax: "params:" ParamDef ("&" ParamDef)* "|" "path:" Path
+
  HandlerArgs: "params:" ParamDef ("&" ParamDef)* "|" "path:" Path
  Path: VFS or other path
+
  Path:         VFS or other path
  ParamDef: Identifier "=" (MacroDef|Value)
+
  ParamDef:     Identifier "=" (MacroDef|Value)
  Identifier: String value
+
  Identifier:   String value
  Value: String value
+
  Value:       String value
  MacroDef: "${" (FixedMacro | (MacroPrefix "." MacroName)) "}"
+
  MacroDef:     "${" (FixedMacro | (MacroPrefix "." MacroName)) "}"
  MacroPrefix: "key" | "param" | "pageContext"  
+
  MacroPrefix: "key" | "param" | "pageContext"  
              | "property" | "elementProperty"  
+
              | "property" | "elementProperty"  
  MacroName: String value
+
  MacroName:   String value
  FixedMacro: "currentuser.name" | "currentuser.firstname" | "currentuser.lastname"  
+
  FixedMacro:   "currentuser.name" | "currentuser.firstname" | "currentuser.lastname"  
            | "currentuser.fullname" | "currentuser.email" | "currentuser.street"
+
              | "currentuser.fullname" | "currentuser.email" | "currentuser.street"
            | "currentuser.zip" | "currentuser.city" | "currentuser.country"
+
              | "currentuser.zip" | "currentuser.city" | "currentuser.country"
            | "request.uri" | "request.folder" | "request.encoding" | "request.locale"
+
              | "request.uri" | "request.folder" | "request.encoding" | "request.locale"
            | "currenttime"
+
              | "currenttime"
            | "opencms.uri" | "opencms.filename" | "opencms.folder" | "opencms.default.encoding"
+
              | "opencms.uri" | "opencms.filename" | "opencms.folder" | "opencms.default.encoding"
  
 
=== Explanation of the MacroPrefix values ===
 
=== Explanation of the MacroPrefix values ===

Revision as of 09:59, 20 February 2007

Admin Tool parameters

Tools can be given parameters which are automatically appended to the generated tool buttons. Parameters are set using the property admintoolhandler-args and may have the following syntax.

HandlerArgs:  "params:" ParamDef ("&" ParamDef)* "|" "path:" Path
Path:         VFS or other path
ParamDef:     Identifier "=" (MacroDef|Value)
Identifier:   String value
Value:        String value
MacroDef:     "${" (FixedMacro | (MacroPrefix "." MacroName)) "}"
MacroPrefix:  "key" | "param" | "pageContext" 
              | "property" | "elementProperty" 
MacroName:    String value
FixedMacro:   "currentuser.name" | "currentuser.firstname" | "currentuser.lastname" 
              | "currentuser.fullname" | "currentuser.email" | "currentuser.street"
              | "currentuser.zip" | "currentuser.city" | "currentuser.country"
              | "request.uri" | "request.folder" | "request.encoding" | "request.locale"
              | "currenttime"
              | "opencms.uri" | "opencms.filename" | "opencms.folder" | "opencms.default.encoding"

Explanation of the MacroPrefix values

key is a message bundle key.

param is a HTTP request parameter

pageContext is a JSP page context attribute

property is a VFS property of the requested tool's CMS resource

elementProperty a VFS property of the currently requested element which might be an included resource, not necessarily the resource requested by the user

External Links

Adding a New Admin Tool

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox