Answer the question
In order to leave comments, you need to log in
Why doesn't TWIG output Cyrillic correctly?
Twig basically goes crazy when I write some Russian text in templates, I can't understand why, a year ago everything worked like clockwork
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
{% block head %}
<title>{% block title %}{% endblock %} - тест TEST</title>
{% endblock %}
</head>
<body>
<div id="content">
{% block content %}
{% endblock %}
</div>
<div id="footer">
{% block footer %}
<div><a href=""><span>тест</span></a></div>
{% endblock %}
</div>
</body>
</html>
{% extends "admin-index.twig" %}
Файл content.twig
{% block title %}Index{% endblock %}
{% block head %}
{{ parent() }}
<style type="text/css">
.important { color: #336699; }
</style>
{% endblock %}
{% block content %}
<h1>Index</h1>
<p class="important">
Welcome on my awesome homepage.
</p>
{% endblock %}
{% block footer %}
{{ parent() }}
<h1>TECT </h1>
{% endblock %}
Answer the question
In order to leave comments, you need to log in
UPD: Demolished twig, rolled blade. And I feel great, I advise.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question