How to manually edit toolbar
These documentation pages are no longer maintained. Please visit the new documentation site.
In some cases, perhaps you need to edit the configuration file for toolbar instead of using admin interface. Before do that, you need to understand the structure of the configuration file. The configuration file, named toolbar.ini, can be found under folder settings. It contains the following blocks:
- [Toolbar] It uses array 'AvailableToolBarArray' to define available toolbars.
- [Tool] It uses array 'AvailableToolArray' to define available tools.
- Several [Toolbar_$toolbarName] blocks depending on available toolbars. Here variable $toolbarName should be exactly like you have defined in 'AvailableToolBarArray' of block [Toolbar]. It uses array 'Tool' to define tools contained in this toolbar.
- [Tool_$toolName] block. If an available tool has parameters, then this block should be defined in the configuration file, otherwise, no need to have this block. There is no requirement about which parameter name it can use or how many parameters it can have.
To change toolbar settings, it is not recommended to edit this file, instead you should edit file settings/siteaccess/site/toolbar.ini.append.php. Below describes examples about how to achieve some basic changes of toolbar:
-
Add a tool to available tool array.
You need to copy the standard [Tool] block defined in settings/toolbar.ini to this file and add the new tool name to the end of the block. -
Add a tool to one toolbar.
Edit block [Toolbar_$toolbarName] in this file by adding line Tool[]=$toolname to somewhere in the block. If the tool added has parameters, create a block [Tool_$toolbarName_$toolname_$placement] and defind parameters in this block. Here, variable $toolbarName is the name of the toolbar (top, bottom, ... ), $toolname is the name of tool ( link, login ... ) and $placemen is the position number of this tool in block [Toolbar_$toolbarName] started from 1 ( not 0 ). If there are other blocks of [Tool_$toolbarName_*_*], make sure the placement nubmer is correct after changes. -
Delete a tool of one toolbar.
Delete the tool from block [Toolbar_$toolbarName]. Delete block [Tool_$toolbarName_$toolname_$placement] if it exists. As well, you need to update placement for all existing [Tool_$toolbarName_*_*] blocks.
Comments