LPS-51842 Don't open dialogs for adding sub pages in Pages Administration
LPS-51842 SF - move code closer to where it is used