[BUGFIX] Analyse root line to find both main and sub template

This change ensures that when resolving the page templates, the PageService will not stop until both a main and sub template seletion value is resolved.

Close: #177