Skip to content

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

Open
@XartIrok

Description

@XartIrok

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions