There are several special templates names that will be automatically included into the /admin/edit/xxx page from when you create these specially named templates.
These templates are included using the all catinclude tag; so if you need something in the sidebar just for persons, create a _admin_edit_sidebar.person.tpl file in your project.
If you need to override TinyMCE options; adding plugins, or setting other settings; you can create an _admin_tinymce_overrides_js.tpl file which can contain extra settings for the TinyMCE editors in the admin.
The template must contain Javascript which modifies the tinyInit variable just before the editor is started. For example, to tweak the “paste” options you can put the following in the template:
tinyInit.theme_advanced_blockformats = "p,h1,h2"
tinyInit.paste_auto_cleanup_on_paste = true;
tinyInit.paste_remove_styles = true;
tinyInit.paste_remove_styles_if_webkit = true;
tinyInit.paste_strip_class_attributes = true;
tinyInit.paste_text_sticky = true;
tinyInit.paste_text_sticky_default = true;
This section contains examples of templates to create widgets for the /admin. Each of these examples extends basic several widget templates from mod_admin. To write your own you need to drop example content and fill holes in these example widgets.
You can use them as basis for your’s site admin-related tasks.
To make an entire admin widget visible or not, depending on some condition that you want to calculate inside the widget’s code, you can use the widget_wrapper block (which sits around the entire widget) in combination with the inherit tag, wrapping that with a condition.
For instance, mod_backup uses this technique to display the import/export sidebar widget. Excerpt from mod_backup’s _admin_edit_sidebar.tpl:
{# Make the widget conditional, based on the config value mod_backup.admin_panel #}
{% block widget_wrapper %}
{% if m.config.mod_backup.admin_panel.value %}
{% inherit %}
{% endif %}
{% endblock %}
See also