Created
September 22, 2014 07:36
-
-
Save lolautruche/5b805d071a09f72a8fcf to your computer and use it in GitHub Desktop.
eZ language switcher and legacy routes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Pagelayout from SiteBundle #} | |
{% block menu %} | |
{# Assuming you may have your own menu markup here as well #} | |
{# Defaults to the current route, unless routeRef is already defined #} | |
{% set routeRef = routeRef|default( ez_route( params={"language": "esl-ES"} ) ) %} | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "MySiteBundle::pagelayout.html.twig" %} | |
{% block menu %} | |
{# Defining a specific route reference for current legacy module #} | |
{# You may also add view parameters and/or query parameters #} | |
{% set routeRef = ez_route( "ez_legacy", {"module_uri": app.request.attributes.get( "semanticPathinfo" )} ) %} | |
{{ parent() }} | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parameters: | |
ezpublish_legacy.my_siteaccess.module_default_layout: "MyLegacyBundle::pagelayout_legacy.html.twig" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment