I think particle is the core feature of gantry 5, if one doesn't understand and master particles, then he is not reallying taking full advantage of gantry 5. Although the twig/yaml thing seem quite intimidating to non-developers, but I think particle systme does offer an much easier alternative for users who want to have their own module but lack the skill to make one. So I'm determined to put some efforts on learning how to customize particles.
I have successfully created my own particles and overrided some existing ones, now I set out to customize menu particle. This one looks a lot different from others, so I have lots of questions, here are the most essencial ones which I don't think is easy to get answer from googling:
1. In
documentation
it says
{% extends '@nucleus/partials/particle.html.twig' %}
"is a must-have element for all Particle Twig Files.", but I couldn't find it in menu.html.twig, insteadly, I find this line
{% set menu = gantry.menu.instance(particle) %}
Is it equivalent to the former?
2. Another part the documentation deems 'required' is "{% block particle %} and {% endblock %} ", but they are also nowhere to be found in menu.html.twig, why?
3.In line 116, there is
{% if menu.root.count() %}
Where can I find the definition of this 'menu.root.count()'?