I think you should create ‘type’ page first and after create ‘locality’ page then choose template which you want. Then assign parent as ‘type page’. i.e type->localty
So when you call this “https://example.com/?page_id=7” you get automatically permalink(if permalink is set) “https://example.com/type/reality”.
You can get page name ‘realty’ by using page id and accordingly display images.