Add support for template inheritance from content

There is no common way of specifying blocks, so the patterns are specified by user. See extends test cases for example use.