[TWIG][Templates] check if variable is defined in twig before using it

fixes error in /actor/X, where there's no page_title defined
This commit is contained in:
Phablulo Joel 2021-12-24 11:43:18 -03:00
parent de89cffc34
commit dad322e577

View File

@ -10,7 +10,9 @@
{% block body %} {% block body %}
<header class="feed-header"> <header class="feed-header">
{% if page_title is defined %}
<h1>{{ page_title | trans }} {{ 'feed' | trans }}</h1> <h1>{{ page_title | trans }} {{ 'feed' | trans }}</h1>
{% endif %}
<nav class="feed-actions" role=navigation> <nav class="feed-actions" role=navigation>
{% for block in handle_event('AddFeedActions', app.request) %} {% for block in handle_event('AddFeedActions', app.request) %}
{{ block | raw }} {{ block | raw }}