added subpage support for smw_templates and smw_page

'---' serving as a placeholder for '/'