On 2014-01-17 8:56 AM, Anton Alexeev wrote:

Where can I find any information about "Block and Extensions & Includes" in diet templates? In the the diet documentation I can only find "TODO" and in the Jade documentation is not really much more information - "To Be Continued....". Here is some information about includes but seems that they don't work in diet. WTF?

Can anybody post some examples or a link with documentation?

The more useful examples are in userman.
https://github.com/rejectedsoftware/userman/tree/master/views

I've never tried includes, I think extends and blocks can serve that
purpose. You make your diet template "extends file" without .dt. This
file has to have code you want to include, and so you specify the "block
name" command at the place of inclusion.

In the end, you know you're including or defining the block only if
there's text indented further under it (defines) or no text indented
further (includes).

e.g.

Filename: "myproject.something.dt"

block content

h1 Welcome!
p This is some content.

This file includes:

extends myproject.something

!!! 5
html

 head
         title hello

body

block content