Using Master Templates

Sub-templates provide a way for you to organize complex code generation processes from a master template. Just as subroutines in a computer program let you call bits of logic from a main program flow, sub-templates let you call bits of code generation logic from a master template.

To use a sub-template, you must first register the sub-template in the parent template. You can then merge properties from the sub-template into the parent template, copy properties from the sub-template to the sub-template, set properties in the sub-template, and render the sub-template.

 

Here's a video tutorial on Master Templates!