generalise page type detection in search results component