Feature #374
Ability to inline templates from another file
Description
Give templates an option to include (inline) other template files.
The preferred syntax to this would be something like:
{{ include %(file_name)s }}
The effect would be that the content of the named template would be placed on the position that the include
command is at. Tags and commands in the named template would be executed as if they were part of the template that contained the include
.
Associated revisions
History
#1 Updated by Elmer de Looff about 13 years ago
- Category set to TemplateParser
#2 Updated by Elmer de Looff almost 13 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 70
This has been implemented in r3171.
The correct syntax is
<html>
<body>
{{ inline content.html }}
</body>
</html>
This triggers the templateparser to load content.html
and insert it at the position of the inline
command. This change and the one mentioned in #252 are developed in a separate branch, and will still need to be merged with the rest of the codebase upon completion.
#3 Updated by Elmer de Looff almost 13 years ago
- Status changed from Resolved to Closed
- % Done changed from 70 to 100
All relevant tests and documentation has been added, and the development branch has been merged in to the production branch.
Included an {{inline}} function to the templateparser which allows for users to inline another template. This resolves #374.