pjax title fix
This commit is contained in:
parent
c7c89acc7f
commit
8d585bd467
|
@ -5,6 +5,8 @@
|
|||
<title>{{ title }} - ALLERTA sistema gestionale {{ owner }}</title>
|
||||
<link href="{{ urlsoftware }}/resources/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon">
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1">
|
||||
<meta name="google" content="notranslate">
|
||||
<meta name="robots" content="none">
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
<script src="{{ urlsoftware }}/resources/dist/main.js"></script>
|
||||
{% if enable_technical_support and technical_support_open %}
|
||||
|
@ -77,7 +79,12 @@
|
|||
<b>{{ 'You are offline'|t }}.</b> {{ 'Last update'|t }}: <p style="display: inline" id="offline_update"></p>
|
||||
</div>
|
||||
<!-- Content -->
|
||||
<div id="content">{% block content %}{% endblock %}</div>
|
||||
<div id="content">
|
||||
{% block pjax_content %}
|
||||
{% if pjax_requested %}<title>{{ title }} - ALLERTA sistema gestionale {{ owner }}</title>{% endif %}
|
||||
{% block content %}{% endblock %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<!-- /Content -->
|
||||
<!-- Footer -->
|
||||
<footer hidden id="bottom" class="row text-left p-4">
|
||||
|
|
|
@ -62,7 +62,8 @@ function loadtemplate($templatename, $data, $requirelogin=true)
|
|||
}
|
||||
$template = $twig->load($templatename);
|
||||
if(isset($_SERVER["HTTP_X_PJAX"]) || isset($_GET["X_PJAX"]) || isset($_GET["_PJAX"])) {
|
||||
echo $template->renderBlock("content", $data);
|
||||
$data["pjax_requested"] = true;
|
||||
echo $template->renderBlock("pjax_content", $data);
|
||||
} else {
|
||||
echo $template->render($data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue