Fix basename detection across pages for resource list