Updated: support both loadView and fetchTemplate method; fixed a php 'undefine index' error