unified sub-page creation code and testing