Support cloning templates
Load partial plugins after the javascript in order to enable the plugins
to use the javascript functions.