-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Missing good examples of configuration template paths for laminas-view in mezzio #112
Comments
The skeleton application contains examples for the configurations: |
@froschdesign I used this
But when I've made some investigation of
Then later in handler I was able to use renderer like this
It works for me!
Inside of Thank you again! |
This creates a separate and isolated renderer and there is no magic, so the configuration of your application is not used here.
And this gives you the prepared renderer of mezzio-laminasviewrenderer:
class LaminasViewRendererFactory
{
public function __invoke(ContainerInterface $container): LaminasViewRenderer
{
$config = $container->has('config') ? $container->get('config') : [];
$config = $config['templates'] ?? [];
// …
}
} |
Hi guys!
I'm trying to integrate
mezzio/mezzio-laminasviewrenderer
into our mezzio project which was only api oriented. I needlaminas-view
templates to generate html code for emails.I have read documentation from this page https://docs.mezzio.dev/mezzio/v3/features/template/laminas-view/
And there is an example of rendering html like this one
What is
'blog/entry'
???What is
'layout::blog'
???How to configure them and how to attach them to real phtml files?
I was trying to understand source code from
/vendor/mezzio/mezzio-laminasviewrenderer/src/LaminasViewRendererFactory.php
. It contains this example:Can somebody show me and example of configuring 'paths'?
Looks like it should be like this:
or
Am I correct? Is there a good example with source code how to use laminas-view with mezzio?
The text was updated successfully, but these errors were encountered: