infinito/application/symfony/templates/entity/entity.html.twig
2019-03-28 13:38:47 +01:00

18 lines
719 B
Twig

{# @todo Refactor this template #}
{% set layer = requested_action_service.getLayer()%}
{% set headline = (layer|trans|capitalize) %}
{% if requested_action_service.hasRequestedEntity() and requested_action_service.getRequestedEntity().hasIdentity() %}
{% set headline = headline~': ' %}
{% set entity = requested_action_service.getRequestedEntity().getEntity() %}
{% if entity.hasSlug is defined and entity.hasSlug %}
{% set headline = headline~entity.slug %}
{% endif %}
{% set headline = headline~'#'~entity.id %}
{% endif %}
{% extends "frames/default.html.twig" %}
{% block title %}
{{ headline }}
{% endblock %}
{% block content %}
{% include "entity/_entity.html.twig" %}
{% endblock %}