willianmano / moodle-theme_moove

A Moodle Boost child theme
GNU General Public License v3.0
173 stars 158 forks source link

where is the navbar in the course page? #453

Closed sabersaberi2 closed 2 days ago

sabersaberi2 commented 5 months ago

Describe the bug i can't find navigation in the course page To Reproduce Steps to reproduce the behavior: go to any course first page

Expected behavior show something such as: home/categoryA/courseB

Your environment (please complete the following information):

Additional context you can see navbar in the activity of the course : courseB/activity C but i want see home/cat A/course B in the first page of course. in the default classic theme you can see navbar such as i say but in the moove we can not see that.

christopherm00 commented 3 months ago

Another vote on this issue - also known as the breadcrumbs we are Moove Premium users and would love to have this option/ feature implemented

brankopetric commented 2 days ago

Ok, we had the same issue. It is easier to jump back to category from breadcrumbs, sometimes :)

This is not a bug, since this navigation is generated by parent theme Boost.

If you want to have categories in breadcrumbs. This is how I add quick fix for it:

  1. Copy file: .../theme/boost/classes/boostnavbar.php to .../theme/moove/classes/

  2. Edit .../theme/moove/classes/boostnavbar.php and replace next line. namespace theme_boost; with namespace theme_moove;

  3. In same file comment some lines: line 79://$this->remove($item->key, \breadcrumb_navigation_node::TYPE_CATEGORY); line 83: //$this->remove($this->page->course->id, \breadcrumb_navigation_node::TYPE_COURSE); line 114: //$this->remove($item->key, \breadcrumb_navigation_node::TYPE_CATEGORY);

  4. If you are admin redirect your browser to Notifications page .../admin/index.php . This will ask moodle to find this new class, autoload.

  5. Edit file .../theme/moove/classes/output/core_renderer.php and at the bootom of the file before last } add this lines. This will override boost function navbar();

/**

  1. Purge theme cache

But I believe adding setting option to a theme to choose boost like navigation or classic navigation(with categories) will be much better option and it wont be hard to add it in code. Maybe also some additional CSS for breadcrumbs can be added since it may become too long in some cases.

Hope this helps!

willianmano commented 2 days ago

@sabersaberi2 @christopherm00 thank you for reply this. @brankopetric thank you for contributing to it. I created a new option to choose between boost and classic breadcrumb.

brankopetric commented 2 days ago

Thank you for the fast response :D