You can define template lookup rules where Agavi would first look for a custom template and then for the standard, "built-in" default one:

http://github.com/digitarald/redracer/commit/961c6ac0528f148b75ae2a02de39a573b82678f3
http://github.com/digitarald/redracer/commit/a56e49396f8f6189d6b5ec252ab5e6ca3f7e2438
http://github.com/digitarald/redracer/commit/30cd893d6c2cbcda8f34be59dd723bf6e5c83d97

(the last one finally implements it right :p)

- David



On 04.08.2009, at 10:03, [email protected] wrote:

David,

The different front ends are identical in functionality, except for the
templates, and a few nodes in the settings.xml.


In this case it's probably enough to choose appropriate templates in the views.

Something like

return AgaviConfig::get('active_site', 'Default').'Success');

or to reuse input templates:

$this->getLayer('content')- >setTemplate(AgaviConfig::get('active_site', 'Default').'Input');


To switch the master you could do something like:

$this->getContext()->getLayer('decorator')- >setTemplate(AgaviConfig::get('core.templates').'/some_other_master');


If you specify your template prefix or postfix per site in you project's baseview it's probably a very fast change to have additional sites.

See http://www.mivesto.de/agavi/agavi-faq.html#general_17 and http://www.mivesto.de/agavi/agavi-faq.html#general_18 for a quick hint.

Another simple approach would perhaps to have a module for each site and reuse the action/view/templates from widgets defined in a "Common" module both site-modules use.

If you just want theming for you sites you may define body ids or classes and change the whole style using CSS only (maybe with combining/defining another layout/master in your output_types.xml).

Regards,

Steffen


Thanks

---------------------------------------

Cristiana Yambo

Senior Site Developer

[email protected] <mailto:[email protected]>

212-287-6398




--
<html><head>
<title>DEREFER</title>
<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=http://www.gmx.net/de/?status=hinweis ">
</head>
<body bgcolor="#ffffff" link="#666666" vlink="#666666">
<table width="100%" height="100%" border="0"><tr><td align="center"><a href="http://www.gmx.net/de/?status=hinweis";><font face="Arial, Helvetica, sans-serif" size="2" color="#666666">Einen Moment bitte, die angeforderte Seite wird geladen...</font></a></ td></tr></table>
</body></html>



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


Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

Reply via email to