Skip to content

Commit

Permalink
Read the sidebar position from configuration file, default to 15
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Oct 4, 2017
1 parent 81827cc commit ec31e6d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
],
/*
|--------------------------------------------------------------------------
| Set the sidebar position of the block menu item
|--------------------------------------------------------------------------
*/
'sidebar-position' => 15,
/*
|--------------------------------------------------------------------------
| Array of middleware that will be applied on the page module front end routes
|--------------------------------------------------------------------------
*/
Expand Down
2 changes: 1 addition & 1 deletion Events/Handlers/RegisterBlogSidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function extendWith(\Maatwebsite\Sidebar\Menu $menu)
$menu->group(trans('core::sidebar.content'), function (Group $group) {
$group->item(trans('blog::blog.title'), function (Item $item) {
$item->icon('fa fa-copy');
$item->weight(15);
$item->weight(config('asgard.blog.config.sidebar-position', 15));

$item->item(trans('blog::post.title.post'), function (Item $item) {
$item->icon('fa fa-copy');
Expand Down
2 changes: 2 additions & 0 deletions changelog.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
url: https://github.com/AsgardCms/Blog
versions:
"3.0.1@unreleased":
added:
- Read the sidebar position from configuration file, default to 15
changed:
- Removed usages of <code>URL::route()</code> in favor of <code>route()</code>
removed:
Expand Down

0 comments on commit ec31e6d

Please sign in to comment.