-
Notifications
You must be signed in to change notification settings - Fork 4
Block module
donnerjack13589 edited this page Aug 31, 2010
·
2 revisions
This is a standart module included with nTPL.
require("./nTPL.block");
Note that you must require nTPL before and nTPL.block.js must be in your project’s folder.
Template #1
< div >
{%block 'pre-content' %}
default value of this block
{%/block %}
{%block ‘content’ %}
default value of this block
{%/block %}
</ div>
Lets name this template as “base”
Template #2
{%extends 'base' %}
{%block ‘content’ }
not default content
{/block %}
Now when you’ll render second template you will see that value of first block is default, while value of second is “not default content”.