Docs on the basics of the guts

Knowing very little about Twig or Grav (although I did a lot with Symfony some time ago), it is not clear where the controllers are for some things. I can see the more obvious controllers, like system/src/Grav/Common/Page/Page.php, but, for example, I do not know what is being called for the sidebar. The plugin only has a js in it, but somewhere something is calling the ‘database’ to get a list.

When I look in the twig I see, for example “content”, which is obviously the content object sent pack from Grav\Common\Page::controller, but it is not clear where “related_path” comes from when used in relatedpages.html.twig ( {% for related_path, score in related_pages %} ).

Can someone point me to the docs that explain this, or better yet, the entire request/response cycle and the various places/steps it goes thru?

Thanks

You mean the Grav Lifecycle?

Things like related_pages and score aren’t Grav core things. They’re part of the plugin itself.

YES! Thanks (regarding lifecycle)

I see… so, the ‘relatedpages.php’ is the controller for the plugin, and the templates/partials/relatedpages.html.twig is the ‘view’.