Movable Type plugin to enable layout and slot style template writing.
Create a new template module named 'BasicLayout' to use as a layout.
<html>
<head>
<title><mt:Slot name="head_title" append=" | " desc="Document Title">My Blog</mt:Slot></title>
</head>
<body>
<mt:Slot name="html_body" desc="Document Body"></mt:Slot>
<mt:Slot name="html_footer" desc="Document Footer">© ideaman's Inc.</mt:Slot>
</body>
</html>
Then create a new index template to use this layout.
<mt:Layout module="BasicLayout">
<mt:Slot name="head_title">Top Page</mt:Slot>
<mt:Slot name="html_body">
Here is body.
</mt:Slot>
</mt:Layout>
The result of the index template is like this.
<html>
<head>
<title>top Page | My Blog</title>
</head>
<body>
Here is body.
© ideaman's Inc.
</body>
</html>
If you use mt:Slot in mt:Layout, original mt:Slot tags in layout module will be replaced by name.
To use content of original slot, skip to write mt:Slot tag in mt:Layout.
Defines of replace partial. If used in mt:Layout, the original slot is replaced. Or not in mt:Layout, defines a alot.
Required to name of the slot.
Trim white spaces on both of the sides of content.
Default is 1(true). Set 0 or empty not to trim.
Use a module or file as layout.
Modifiers are compatible with mt:Include tag.
Check if a value already filled.
Required to name of the slot.
Use in mt:Slot tag to define header and footer of the slot.
If the contents of the slot is not empty, they will be displayed.