From: Mark Story Date: Fri, 11 Mar 2011 03:35:36 +0000 (-0500) Subject: Updating documentation for blocks, mentioning that block names cannot contain -.... X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=92b0ec434f35dd5e6094031bc6f525748044437f;p=web%2Fkonrad%2Ftwig.git Updating documentation for blocks, mentioning that block names cannot contain -. Fixes #277 --- diff --git a/doc/templates.rst b/doc/templates.rst index ef940e1..5003eae 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -275,7 +275,8 @@ template. This limitation exists because a block tag works in "both" directions. That is, a block tag doesn't just provide a hole to fill - it also defines the content that fills the hole in the *parent*. If there were two similarly-named ``{% block %}`` tags in a template, that template's parent -wouldn't know which one of the blocks' content to use. +wouldn't know which one of the blocks' content to use. Block names should +consist of alphanumeric characters, and underscores. Dashes are not permitted. If you want to print a block multiple times you can however use the ``block`` function: