Am 10/14/2012 1:28 AM, schrieb Matej Nanut:

Bah! I wasn't using the newest vibe.d version. Now the compile doesn't
fail anymore (it did before, saying the template didn't start with "!!!

But, instead, the blocks filled in the rendered page aren't filled in
the result.

Sorry for the last example, I've since noticed the syntax was wrong in a
few parts and have updated them. I'll also write a smaller example here,
to hopefully outline my intentions better.

Here goes:

layout.dt

!!! 5
html
   head
       block title
       link(rel="stylesheet", type="text/css",
href="css/bootstrap.min.css")
   body
       block body

layout_modal.dt

extends layout

block body
   .modal
       .modal-header
           block modal-header
       .modal-body
           block modal-body
       .modal-footer
           block modal-footer

login.dt

extends layout_modal

block title
   title Test page

block modal-header
   h2 Test Page

block modal-body
   p Some kind of form will be put here.

So, the result of this is as if I were rendering layout_modal.dt
directly. Seems like login.dt is ignored? (The title doesn't get set
either.) I'm 100 % certain that I'm actually calling
.render!("login.dt") and not layout_modal.dt.

Thanks!

There was a bug in the parser that caused recursive block definitions to
be ignored - unfortunately fixing this was a bit more involved than it
should have been, because, for some reason, I constantly hit compiler
bugs...

But it's fixed now on master (at least the example works correctly)