Hi @wbmnfktrThanks for your answer.
I'm indeed using the TemplateEngineLatte module, but I think my issue is more related to the point mentionned by @BillH regarding the "sort=sort" parameter nested pages.
I ended up adopting a recursive approach to solve my problem as shown below :
<?php
// In init.php
$catalogue_root = $pages->get(1027);
$view->categories = getOrderedCategories($catalogue_root->id);
function getOrderedCategories($current_category_id, &$categories = []) {
$current_categories = wire()->pages->get($current_category_id)->children('template=category');
foreach($current_categories as $category) {
$categories[] = $category; // populate the reponse with category page object
getOrderedCategories($category->id, $categories); // proceed with sub categories
}
return $categories;
}