infinito/application/symfony/templates/entity/entity.html.twig

18 lines
719 B
Twig
Raw Permalink Normal View History

2019-02-25 12:50:26 +01:00
{# @todo Refactor this template #}
2019-02-24 15:34:33 +01:00
{% set layer = requested_action_service.getLayer()%}
2019-02-25 21:23:49 +01:00
{% set headline = (layer|trans|capitalize) %}
2019-02-25 20:45:15 +01:00
{% if requested_action_service.hasRequestedEntity() and requested_action_service.getRequestedEntity().hasIdentity() %}
2019-02-25 21:23:49 +01:00
{% set headline = headline~': ' %}
2019-02-25 12:50:26 +01:00
{% 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 %}
2019-02-24 15:34:33 +01:00
{% endif %}
2019-03-28 13:38:47 +01:00
{% extends "frames/default.html.twig" %}
2019-02-17 22:05:20 +01:00
{% block title %}
2019-02-25 12:50:26 +01:00
{{ headline }}
2019-02-17 22:05:20 +01:00
{% endblock %}
{% block content %}
2019-03-28 13:38:47 +01:00
{% include "entity/_entity.html.twig" %}
2019-02-17 22:05:20 +01:00
{% endblock %}