-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional path for templates #6
Comments
Thanks :) If you're asking for a per-request thing, no C::V::Xslate doesn't do it, and until Text::Xslate changes, it never will. If what you want is a per-request thing as above, under what circumstances would you need it? |
O, ;( Bad... I need to change path of templates according Host header, cause my Catalyst application is used for more than one sites at one time. |
With TT it's easy (changing templates path per-request), but TT is very slow. :( |
I've found a solution at #catalyst (thanks t0m): In MyApp::View::Xslate before process => sub { And it works perfectly. Could you add this solution to the POD? Also about POD improvement. What about adding: |
Yeah, that works, but it completely takes away the performance gains that xslate offers, because Xslate works best when used in a persistent environment, so that it can utilize its internal So no, I don't want to put it in the docs, as it gives the false impression that this can be I don't really understand why you would need to change the settings for xslate for |
Good idea. How to switch depending on the request in the Catalyst? I don't know. |
$c->forward('View::CustomView'); |
I want to set up a path for templates files in controller. In TT it's available over $c->stash->{'additional_template_paths'} = [...];
Is it available in Catalyst::View::Xslate? I think it's available when changing
path => $self->path || [ $c->path_to('root') ], at your code to
path => $self->path || [ $c->stash('additional_template_paths')] || [$c->path_to('root')],
May be other solution exists, let me know.
The text was updated successfully, but these errors were encountered: