What is the best way to start theme development Moodle 4.x.x?

What is the best way to start theme development Moodle 4.x.x?

per Ashish Pondit -
Nombre de respostes: 4

I am new to Moodle and I want to develop a Boost based theme. I have to heavily customise the Top navbar, Custom Footer and Create some custom papges.

I am trying to understand the Moodle theme structure and how they works. I know there are lot of resources for theme development but I think this discussion can be helpful for future developer who want guidence on Moodle theme development.

 I have already completed the following courses from Moodle Academy.

  1. Setting up a Moodle Development Environment.
  2. Web Output Essentials.
  3. Moodle’s Modular Architecture and APIs.
  4. Moodle Access & Security Essentials.

I have also followed the Theme documentation which covers the following topics:

Currently I am stuck on Extending the custom menu tutorial trying to override render_custom_menu from core_renderer.

I have also gone through Theme FAQ documentation.

I am overwhelmed by the various render, templates and layouts. 

Please guide me what is the best approach for developing / customizing Moodle 4.x.x theme.

Mitjana de qualificacions: -
En resposta a Ashish Pondit

Re: What is the best way to start theme development Moodle 4.x.x?

per Gareth J Barnard -
Imatge de Core developers Imatge de Particularly helpful Moodlers Imatge de Plugin developers
Dear Ashish,

In what way are you stuck?

Themes have evolved over time along with the various API's and as such indeed they can be confusing as there is many ways to solve the same problem. Therefore in my opinion, there is no best approach, rather that experience brings understanding of what the given solution is required for any specific problem.

Gareth
En resposta a Gareth J Barnard

Re: What is the best way to start theme development Moodle 4.x.x?

per Ashish Pondit -
I wanted to customize the primary navigation. I have found that there is option for extending Secondary navigation but not for primary navigation.

Fron the navigation api does not privide any way to modify the primary navigation. I have to add 2/3 role based item in the Primary navigation.
How can I do it?
En resposta a Ashish Pondit

Re: What is the best way to start theme development Moodle 4.x.x?

per Gareth J Barnard -
Imatge de Core developers Imatge de Particularly helpful Moodlers Imatge de Plugin developers