Added innerquery handler to CMS::getMaterialsByStructures to perform paging and sorting