Controllers are registered with the
controllers extension accepts an array of controllers where the key is the name of the associated template and the value a callback function that returns an array of variables for your template.
You can now use the
$articles variable in your blog template.
Alternatively, you can require a file. The required file would be a controller with a function that returns an array of variables for your template.
You can directly use the defined variables in the related template.