From 3fa5c54772e0697948031f19a8385c135720796a Mon Sep 17 00:00:00 2001 From: joedaimarg Date: Wed, 5 Dec 2018 14:30:21 +0800 Subject: [PATCH 1/2] Add module url helper for sidemenu --- application/helpers/MY_url_helper.php | 7 +++++++ application/modules/admin/views/_partials/sidemenu.php | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/application/helpers/MY_url_helper.php b/application/helpers/MY_url_helper.php index 697d5e4b..3257ffa8 100755 --- a/application/helpers/MY_url_helper.php +++ b/application/helpers/MY_url_helper.php @@ -103,4 +103,11 @@ function referrer() function redirect_referrer() { redirect(referrer()); +} + +// url for current module +function module_url($path = "") +{ + $CI =& get_instance(); + return site_url($CI->router->fetch_module() . "/" . $path); } \ No newline at end of file diff --git a/application/modules/admin/views/_partials/sidemenu.php b/application/modules/admin/views/_partials/sidemenu.php index 0743afa6..14f37978 100755 --- a/application/modules/admin/views/_partials/sidemenu.php +++ b/application/modules/admin/views/_partials/sidemenu.php @@ -9,7 +9,7 @@
  • '> - '> + '> '>
  • @@ -26,7 +26,7 @@ ion_auth->in_group($page_auth[$url]) ): ?>
  • > - +
  • From 690d46e120e4f16e70eaa3cbbe4a6fb7597ed9ba Mon Sep 17 00:00:00 2001 From: "Joedaimar R. Gozon" Date: Thu, 13 Dec 2018 06:23:34 +0800 Subject: [PATCH 2/2] Made $useful_links work if $config['index_page'] is specified --- application/modules/admin/views/_partials/sidemenu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/modules/admin/views/_partials/sidemenu.php b/application/modules/admin/views/_partials/sidemenu.php index 14f37978..08fd12a1 100755 --- a/application/modules/admin/views/_partials/sidemenu.php +++ b/application/modules/admin/views/_partials/sidemenu.php @@ -43,7 +43,7 @@ ion_auth->in_group($link['auth']) ): ?>
  • - '> + '>