3
app.request.get('_route')


{% if app.request.get('_route') == 'road-construction' %}
    <a href="{{ path('road-construction') }}" class="YouAreHere">My Link</a>
{% endif %}

Не работает( Это динамическая страница и у них общий шаблон( У страниц таких общий шаблон индекс но через админку была создана страница динамическая и так как можно разделить динамические ????

1 ответ 1

1
{% if '/company/road-construction' in app.request.uri  %}
                    <a class="popup-modal" href="#test-modal">Open modal</a>

                        <div id="test-modal" class="mfp-hide white-popup-block">
                            <h1>Modal dialog</h1>

                            <p><a class="popup-modal-dismiss" href="#">Закрыть</a></p>
                        </div>
                    {% endif %}

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.