Project

General

Profile

Feature #374

Ability to inline templates from another file

Added by Elmer de Looff over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Elmer de Looff
Category:
TemplateParser
Target version:
-
Start date:
2011-09-23
Due date:
% Done:

100%

Estimated time:
Spent time:

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

Revision 116:0d680915f796 (diff)
Added by Elmer de Looff over 12 years ago

Included an {{inline}} function to the templateparser which allows for users to inline another template. This resolves #374.

History

#1 Updated by Elmer de Looff over 12 years ago

  • Category set to TemplateParser

#2 Updated by Elmer de Looff over 12 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 over 12 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.

Also available in: Atom PDF