# NOTE this plugin_uuid thing might occur in js files from joomla/js, ** do not rename **
def settings_json (self):
result = "{"
- result += "plugin_uuid:%s,"%self.domid
result += ",".join([ self.setting_json(setting) for setting in self.json_settings_list() ])
result += "}"
return result
env.update(self.__dict__)
result = render_to_string ('plugin.html',env)
- env ['settings_json' ] = self.settings_json()
- # compute plugin-specific initialization
- js_init = render_to_string ( 'plugin-setenv.js', env )
- self.add_js_chunks (request, js_init)
+ # as a first approximation we're only concerned with plugins that are associated with a query
+ # other simpler plugins that only deal with layout do not need this
+ if 'query' in self.__dict__:
+ env ['settings_json' ] = self.settings_json()
+ # compute plugin-specific initialization
+ js_init = render_to_string ( 'plugin-setenv.js', env )
+ self.add_js_chunks (request, js_init)
# interpret the result of requirements ()
self.handle_requirements (request)