[Catalyst] Problem Using Jemplate
J. Shirley
jshirley at gmail.com
Fri Mar 21 21:57:43 GMT 2008
On Fri, Mar 21, 2008 at 2:29 PM, Stephen Sykes <stephen at stephensykes.us> wrote:
> I've been playing with jrockway's Jemplate example and when I create the
> view using script/myapp_create.pl view Jemplate the app will no longer
> render the TT view. It seems to overwrite template rendering and will
> print a few lines of javascript to the screen, no matter what screen I
> try to view. Anyone know what the problem is here? If I delete
> /lib/MyApp/View/Jemplate.pm the app will work again by rendering the
> proper tt2 templates.
>
> Thanks in advance for your help.
>
> Stephen
>
Hi Stephen,
Without telling Catalyst::Action::RenderView what view to use, it will
simply guess. Probably not the best behavior, but the easy (and not
very obviously documented) fix is to set the "default_view" config
setting.
Documented in:
http://search.cpan.org/~mramberg/Catalyst-Action-RenderView-0.07/lib/Catalyst/Action/RenderView.pm
MyApp->config( default_view => 'TT' );
Or in myapp.yml:
---
name: MyApp
default_view: TT
That should get you sorted out.
-J
--
J. Shirley :: jshirley at gmail.com :: Killing two stones with one bird...
http://www.toeat.com
More information about the Catalyst
mailing list