-
Notifications
You must be signed in to change notification settings - Fork 9
En dev template special variables
There are some predefined variables in Movable Type CMS screen templates, that can be used to inject code to various parts on the finished HTML. For using them, just append them you code, such as:
<mt:setvarblock name="var name" append="1"> ... your code here ... </mt:setvarblock>
All these should be set before loading the header template. (cms/(include|dialog)/header.tmpl)
adds HTML to the head tag of the page. want to inject additional CSS file? this is the place
Use this one to add additional JavaScript scripts to the page. will be added to the head tag, after the loading of the jQuery library and MT’s own libraries
Setting this to true will disable loading of jQuery.
inject some HTML to the very beginning of the document – right after the opening tag of ‘body’, and inside the main container div tag
inject HTML just above the form title
inject HTML just below the form title
if set to true, the page will open a dialog immediately on load. use the “dialog_mode” and “dialog_params” for setting which page will be loaded in the dialog box. the URL used will be:
script_url?__mode=<dialog_mode>&<dialog_params>
The content of this variable will be added to a big JavaScript block in the bottom of the page, along with all MT’s jQuery code, wrapped inside a anonymous function scope. (but you don’t get to use jQuery as ‘$’)