Short answer no. Think of the page hierarchy as a tree. {{extend ...}} points up to a parent. {{include ...}} points down to a child. When your controller returns it calls a view and this one can move up (extend) and down (import) the tree.
If you want to import X which extends Y before being imported, you need to collapse the new tree into a tree node. This means either you use ajax or your use {{=response.render(....)}} inside the importing view. I wound not go this way. Massimo On Feb 29, 4:06 pm, Pedro Pereira <pedrompere...@gmail.com> wrote: > Hi all, > > Is it possible to include in a view, an inherited one? The docs aren't > clear about this issue, so I don't know if the framework is supposed to > allow this behaviour. > I managed to make a simple example of what I'm trying to achieve: > > file 1: default/mytest.html (the view returned by the controller action) > > {{extend 'layout.html'}} > > <p>this is mytest</p> > {{include 'component_a.html'}} > > file 2: component_template.html (the extended template) > > <p>this is component_template</p> > > {{block child}} > {{include}} > {{end}} > > file 3: component_a.html (the included template) > > {{extend 'component_template.html'}} > > {{block child}} > <p>this is component_a</p> > {{end}} > > Running mytest I was expecting: > > this is mytest > this is component_template > this is component_a > > but it outputs: > > this is mytest > this is component_template > > Can anyone help? > Thanks in advance > Pedro