Added ability to add #subobject to templates

Change-Id: Iead8952994b6fc1ab1d962ee6108857dd95c0568