{#- a customField element will be stored in title variable -#} {%- set title = null -%} {#- a customField element will be stored in subtitle variable -#} {%- set subtitle = null -%} {%- set type = constant('Chill\\CustomFieldsBundle\\CustomFields\\CustomFieldTitle::TYPE') -%} {%- set type_subtitle = constant('Chill\\CustomFieldsBundle\\CustomFields\\CustomFieldTitle::TYPE_SUBTITLE') -%} {%- set type_title = constant('Chill\\CustomFieldsBundle\\CustomFields\\CustomFieldTitle::TYPE_TITLE') -%} {# a variable to store that "something has been printed #} {%- set something_has_been_printed = false -%} {%- set title_div_opened = false -%} {%- set subtitle_div_opened = false -%} {% for customField in cFGroup.activeCustomFields %} {% if customField.type == 'title' %} {%- if show_empty == true %} {%- if customField.options[type] == type_title -%} {%- if title_div_opened == false -%}