Hello @VasconcelosAqui , did you fix this? I'm having the same problem.
I think it's related to those annotations. But I wasn't able to make it
work. Even this line doesn't work because current resource is in the
template and the resultant currentPage will be structure of that
template.currentPage =
request.getResourceResolver().adaptTo(PageManager.class).getContainingPage(resource);