That's what I said, on Windows everything works fine, controllers access to templates, but on Linux - it doesn't work. I don't want to use pick method.
$di->set('view', function() {
$view = new \Phalcon\Mvc\View();
$view->setViewsDir('../app/views/');
$view->registerEngines(array(
".volt" => function($view, $di) {
$volt = new \Phalcon\Mvc\View\Engine\Volt($view, $di);
$volt->setOptions(array(
'compiledPath' => '../cache/volt/',
'compiledSeparator' => '_'
));
return $volt;
}
));
return $view;
});
I have {{ content() }} everywhere where i am not using blocks.
<!-- /app/views/index.volt -->
<!DOCTYPE html>
<html>
<head>
{{ get_title() }}
<meta charset="utf-8" />
{{ stylesheet_link('css/bootstrap.min.css') }}
{{ stylesheet_link('css/bootstrap-theme.min.css') }}
{{ stylesheet_link('css/layout.css') }}
{{ javascript_include('js/jquery.js') }}
{{ javascript_include('js/bootstrap.min.js') }}
{{ javascript_include('js/jquery.validate.min.js') }}
<script src="https://cdn.socket.io/socket.io-1.0.6.js"></script>
{% block additional_styles %}{% endblock %}
</head>
<body>
{{ content() }}
{% block content %}{% endblock %}
{% block additional_js %}{% endblock %}
</body>
</html>
{# /app/views/index/index.volt #}
{{ content() }}
<header id="main-information">
{% if username is defined %}
{{ partial('index/top.menu') }}
{% if hasCharacter %}
{{ link_to('logout', 'Logout') }} || {{ link_to("characters/create", "Create new character") }}
{% else %}
{{ partial('character/ui.partial', ['data': charData, 'username': username]) }}
{% endif %}
{# ако има вече герой, то на мястото на линка се слага името на героя, което може да се избира. #}
{% else %}
{{ partial('account/login') }}
{% endif %}
</header>
This works fine on Windows. I have not changed anything.
I am trying to drive it about a week ago already and i am blowing my mind, because I can't understand where is the problem.