Adding Admin Tools
(Difference between revisions)
Cschoenfeld (Talk | contribs) m (indentation of syntax) |
Cschoenfeld (Talk | contribs) m (mentioned macro resolution source code) |
||
Line 17: | Line 17: | ||
| "currenttime" | | "currenttime" | ||
| "opencms.uri" | "opencms.filename" | "opencms.folder" | "opencms.default.encoding" | | "opencms.uri" | "opencms.filename" | "opencms.folder" | "opencms.default.encoding" | ||
+ | |||
+ | See the method ''CmsMacroResolver.getMacroValue(String)'' for details. It is used indirectly by ''CmsTool.buttonHtml()'' which generates the HTML code for a tool button. The call is nested within ''I_CmsToolHandler.getParameters(CmsWorkplace)'' | ||
=== Explanation of the MacroPrefix values === | === Explanation of the MacroPrefix values === | ||
Line 27: | Line 29: | ||
''property'' is a VFS property of the requested tool's CMS resource | ''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 | + | ''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 == | == External Links == | ||
[http://www.opencms-forum.de/opencms-forum/viewthread?thread=887 Adding a New Admin Tool] | [http://www.opencms-forum.de/opencms-forum/viewthread?thread=887 Adding a New Admin Tool] |
Revision as of 10:03, 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"
See the method CmsMacroResolver.getMacroValue(String) for details. It is used indirectly by CmsTool.buttonHtml() which generates the HTML code for a tool button. The call is nested within I_CmsToolHandler.getParameters(CmsWorkplace)
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.