{# @var child_page \AppBundle\Entity\Page #}
<div class="col-md-4 col-sm-4">
    <div class="travel-wrapper get-box-link">
        <div class="item text-left">
            <div class="item-img">
                <div class="lb">
                    {% if child_page.boxStar is not empty %}
                        <div class="cstar_left">{{ child_page.boxStar|raw }}</div>
                    {% endif %}
                    {% if child_page.travelProgram is not empty and child_page.travelProgram.lowestPrice > 0 %}
                        <div class="cprice">ab {{ child_page.travelProgram.lowestPrice|number_format }} € p.P.</div>
                    {% endif %}
                    {% if child_page.boxDiscount is not empty %}
                        <div class="cdiscount">{{ child_page.boxDiscount|raw }}</div>
                    {% endif %}
                </div>

                {% if child_page.boxImageUrl is not empty %}
                    {% set image_url = child_page.boxImageUrl %}
                    {% set image_alt = child_page.travelProgram.title|default(child_page.title) %}
                {% elseif child_page.boxImageUrl is not empty %}
                    {% set image_url = '/uploads/travel_program/' ~ child_page.travelProgram.previewImage.fileNameWithExtension %}
                    {% set image_alt = child_page.title %}
                {% else %}
                    {% set image_url = '/bundles/app/images/no-picture.png' %}
                    {% set image_alt = 'Kein Vorschaubild vorhanden' %}
                {% endif %}
                <img src="{{ image_url }}" alt="{{ image_alt  }}" style="width: 265px; height: 190px;{# #TODO! #}">

            </div>
            <div class="box_mid">
                <div class="hl5">{{ child_page.title }}</div>
                <p>{{ child_page.boxBody ?? child_page.description }}</p>
            </div>
            <a class="item-button is-box-link dobble_line" href="{{ child_page.urlPath }}" title="{{ child_page.title }}">
                {{ child_page.title }}
            </a>
        </div>
    </div>
</div>
