Skip to content
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

[2.1.x] twig problem with render action #610

Open
XartIrok opened this issue Jun 3, 2016 · 1 comment
Open

[2.1.x] twig problem with render action #610

XartIrok opened this issue Jun 3, 2016 · 1 comment
Labels

Comments

@XartIrok
Copy link

XartIrok commented Jun 3, 2016

when i try use twig in my project i get problem with render diffrent action

  1. try
    loader engine
        '.twig' => function($view, $di) {
            @mkdir(APP_PATH . '/cache/twig/' . APP_ENV);
            $options = array();
//            if (APP_ENV == 'prod')
//                $options = array('cache' => APP_PATH . '/cache/twig/' . APP_ENV );
            return new TwigEngine($view, $di, $options);
        }

main view path: view/admin/index.php

        <div class="container">
            {% block content %}{% endblock %}
        </div>

action view path: view/admin/login/index.php

{% extends "index.twig" %}

{% block content %}
    test
    {{ form() }}
        {{ form.render('logon') }}
    {{ endForm() }}
{% endblock %}

on this try nothing render null
try second a change only the main view

        <div class="container">
            {{ content() }}
        </div>

this try end render but only text input was render by a string not as it should

a that moment i try use a stadard volt

@victorhramos
Copy link

here the same at phalcon 3.
Render only the index action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants