Zend framework 2 and Twig (with the ZfcTwig module) - losing layout template content if action template is rendered -
i'm trying utilize zf2 zfctwig module. have basic construction skeleton application: view->layout->layout.phtml (or layout.twig) view->application->index->index.phtml (or index.twig)
if utilize next pair: layout.twig , index.phtml - layout.twig rendered correctly zfctwig module, result index.phtml (default rendering) right also.
but if seek utilize content template twig template (both twig files) - i'm getting index.twig right render, nil layout template (layout.twig or layout.phtml)
did has same situation?
you can utilize twig layouts, works great zfctwig
in index.twig
{% extends 'layout/layout.twig' %} {% block content %} here template {% endblock content %}
in layout.twig
{% block content %}{{ content|raw }}{% endblock content %}
layout zend-framework2 twig
No comments:
Post a Comment