-
Notifications
You must be signed in to change notification settings - Fork 3
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
Examples of usage #3
Comments
I found it...
|
I'll write some example template files soon. MaxnufSmarty uses the same ViewModel as the PhpRenderer. So using it would be the same. just return either an array or a ViewModel in your controller action. for example:
The controller Foo\Controller\BazBatController, with action “doSomethingCrazy”, would be mapped to the template foo/baz-bat/do-something-crazy. have a look at: |
Yes you could indeed directly assign your variables into smarty. But this would mean that you have to fetch the smarty instance from the servicelocator in every controller action. Just return an array. The variables in your array will be automatically assigned to smarty. |
Thanks for your answers! I've never used Smarty before and I'm getting to grips with ZF2 so thanks
|
Hi,
Would you please provide an example or two of how MaxnufSmarty is used inside a Controller class.
How template variables are set for example and how the template is selected.
Many thanks.
Ian
The text was updated successfully, but these errors were encountered: