Skip to content

Commit

Permalink
Merge pull request #62 from airtype/bugfix-module-controller-path
Browse files Browse the repository at this point in the history
Fix module generated controller routes
  • Loading branch information
khalwat committed Mar 29, 2020
2 parents 81f9a35 + 8295404 commit 0c2caee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/templates/module_api_version_3_0/src/_Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ function (RegisterUrlRulesEvent $event) {
<% var controllers = controllerName -%>
<% if ((typeof(controllers[0]) !== 'undefined') && (controllers[0] !== "")) { -%>
<% controllers.forEach(function(controller, index, array){ -%>
$event->rules['siteActionTrigger<%= index + 1 %>'] = 'modules/<%= pluginKebabHandle %>/<%= controller.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();}).slice(1) %>';
$event->rules['siteActionTrigger<%= index + 1 %>'] = '<%= pluginKebabHandle %>/<%= controller.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();}).slice(1) %>';
<% }); -%>
<% } -%>
}
Expand All @@ -285,7 +285,7 @@ function (RegisterUrlRulesEvent $event) {
<% var controllers = controllerName -%>
<% if ((typeof(controllers[0]) !== 'undefined') && (controllers[0] !== "")) { -%>
<% controllers.forEach(function(controller, index, array){ -%>
$event->rules['cpActionTrigger<%= index + 1 %>'] = 'modules/<%= pluginKebabHandle %>/<%= controller.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();}).slice(1) %>/do-something';
$event->rules['cpActionTrigger<%= index + 1 %>'] = '<%= pluginKebabHandle %>/<%= controller.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();}).slice(1) %>/do-something';
<% }); -%>
<% } -%>
}
Expand Down

0 comments on commit 0c2caee

Please sign in to comment.