You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by John <jo...@quivinco.com> on 2013/01/15 16:33:11 UTC

layout component selection based on domain name

I'd like to be able to skin my site depending on domain name by selecting different layout_x.tml+layout_x.css components.

Anyone done this kind of thing and care to shed light?

John

Re: layout component selection based on domain name

Posted by Lance Java <la...@googlemail.com>.
re-reading your question, I notice that you also want to use a different .tml
file. You might find help in Igor's post
http://blog.tapestry5.de/index.php/2011/06/24/template-skinning/



--
View this message in context: http://tapestry.1045711.n5.nabble.com/layout-component-selection-based-on-domain-name-tp5719325p5719329.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: layout component selection based on domain name

Posted by Lance Java <la...@googlemail.com>.
Depending on your use case, you could either:
1. Contribute a ComponentRequestFilter to the ComponentRequestHandler or
2. Contribute a PageRenderRequestFilter to the PageRenderRequestHandler

Either way, the filter will push() an object onto the Environment which your
pages / components can then access (by Environment.peek() or via the
@Environmental annotation). Then your layout component (and other
components) can make decisions based on the value of the Environmental
object.

http://tapestry.apache.org/environmental-services.html
http://tapestry.apache.org/request-processing.html




--
View this message in context: http://tapestry.1045711.n5.nabble.com/layout-component-selection-based-on-domain-name-tp5719325p5719328.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org