Hi,

Agavi uses template lookup patterns to get the correct file to render as a template. These lookup patterns can be set in output_types.xml or dynamically.

Please have a look at http://graste.github.com/Agavi-FAQ/agavi-faq.html#general_24 for a small example.

By default agavi looks for localized templates (e.g. en/*.php or *.en_UK.php). You can change the template lookup pattern defaults per layer via the targets parameter.

This gives you a great deal of flexibility as you can do things like in http://graste.github.com/Agavi-FAQ/agavi-faq.html#general_25 where you can define a whole cascade of template lookups.

Kind regards,

Steffen

On Sun, 17 Mar 2013 01:20:07 +0100, Rafael Guerrero <[email protected]> wrote:




Hi Guys,


Where is the info about of valid paramteres for AgaviTemplateLayer ?
i want to set a custom template in custom directory for reuse template from multiple modules
i saw the example into the web

// re-use the input template for presenting the errors in the form  
$this->getLayer('content')->setTemplate('Input');

checking the class, i can see the magic metod __call
and the config files ( output_type ) i can see other property


<layer name="decorator">
	<ae:parameter name="directory">%core.template_dir%</ae:parameter>
	<ae:parameter name="template">Master</ae:parameter>
</layer>

i guess that i cant execute 
$layer->setParameter('template', $XXXX); 
or
$layer->setTemplate($XXX);

why the  value for template parameter is a View Name?
can i set a filename ?
Are there other possible values  for the template parameter?
what other properties exist for the AgaviTemplateLayer ?

Thansk for your help

--
Atte
Rafael Ángel Guerrero Godoy



_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to