-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #1035 Fixed external menu routes to not include additional parame…
…ters (javiereguiluz) This PR was merged into the master branch. Discussion ---------- Fixed external menu routes to not include additional parameters This fixes #936. --- As explained in #936, any route generated for the main menu includes the `menuIndex` and `submenuIndex` parameters which makes it possible to show the selected menu item. When the route generates a URL that doesn't belong to the backend, these params are included too ... and the result is weird. Imagine a menu item with `route: 'homepage'` and the URL generated being `/?menuIndex=8&submenuIndex=2` instead of the expected `/` This PR improves the menu to detect if the URL generated by the route belongs to the backend or not. If it doesn't belong, no menu parameters are included. Commits ------- 7aa0420 Fixed external menu routes to not include additional parameters
- Loading branch information
Showing
5 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
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
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
1 change: 1 addition & 0 deletions
1
Tests/Fixtures/App/Resources/views/custom_menu/template.html.twig
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The template associated to the route used in the custom menu. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
easy_admin_bundle: | ||
resource: "@EasyAdminBundle/Controller/" | ||
type: annotation | ||
prefix: /admin/ | ||
|
||
custom_route: | ||
path: /custom-route | ||
defaults: | ||
_controller: FrameworkBundle:Template:template | ||
template: 'custom_menu/template.html.twig' |