added subtemplate tags to pages
fixed notice in JS