#1077: Introduce DataTemplateLayer
-------------------------+--------------------------------------------------
Reporter: MugeSo | Owner: david
Type: enhancement | Status: new
Priority: normal | Milestone: 1.0.2
Component: view | Version: 1.0.0
Severity: normal | Keywords:
Has_patch: 1 |
-------------------------+--------------------------------------------------
Comment(by david):
Check it out:
{{{
#!xml
<layer name="content" class="AgaviStreamTemplateLayer">
<ae:parameter name="scheme">data</ae:parameter>
<ae:parameter name="targets">
<ae:parameter>text/plain,${template}</ae:parameter>
</ae:parameter>
</layer>
}}}
And then:
{{{
#!php
<?php
$this->getLayer('content')->setTemplate('hello world');
?>
}}}
Cool, huh? :)
Also, keep in mind that as of Agavi 1.0, you can access data returned from
a View's {{{execute()}}} method through {{{$inner}}} in the first layer's
template!
I'm moving this to milestone "AgaviForge" for now, but we might even want
to consider closing it as ''wontfix'' - but let's discuss it first :)
--
Ticket URL: <http://trac.agavi.org/ticket/1077#comment:6>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets