On Wed, Jul 09, 2008 at 04:42:28PM -0400, Perrin Harkins wrote:
> I have an app built in Mason and MasonX::WebApp.  I want to use the
> same templates and most of the same WebApp code for a new app.
> 
> I could make two WebApps with a shared base class and put them at
> different URLs (/foo/ and /bar/), but I can't see how to make them share
> the same templates.  It seems like I'd have to manipulate the path
> that Mason thinks was requested, but my attempts so far (changing
> $r->uri) have failed.

This is what multiple comp roots are for.  Pull the common templates out and
have e.g.

  [ foo    => '/var/www/foo' ],
  [ common => '/var/www/common' ],

for your app at /foo and

  [ bar    => '/var/www/bar' ],
  [ common => '/var/www/common' ],

for your app at /bar.

hdp.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to