Browse files

Add usage example.

  • Loading branch information...
1 parent bcf4db6 commit df9a7990d395db6f5ecfbce06f509e365ed66966 @fadrizul committed Sep 18, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1
@@ -32,7 +32,11 @@ First we need to declare the extension of your view files. This can be anything
To set values for variable tags, you need to include it as options in res.render() function. In this example we're setting values for {{ name }} and {{ title }}.
+<<<<<<< HEAD
###Template inheritance:
+###Template inheritance
+>>>>>>> Add usage example.
The most powerful part of TwigJS is template inheritance. Template inheritance allows you to build a base “skeleton” template that contains all the common elements of your site and defines blocks that child templates can override.
Sounds complicated but is very basic. It’s easiest to understand it by starting with an example.
@@ -61,7 +65,7 @@ This template, which we’ll call base.html, defines a simple HTML skeleton docu
In this example, the {% block %} tags define four blocks that child templates can fill in. All the block tag does is to tell the template engine that a child template may override those portions of the template.
-####Child Template
+####Child Template
A child template might look like this:
{% extends "base.html" %}

0 comments on commit df9a799

Please sign in to comment.