Hi,
I am trying to access additional config information from my Smart UI command. The idea is to make a command conditional based on things like global parameters in the module (i.e. feature enabled or not), and information about the object itself (i.e. is it a document or a folder).
In another post, I got a solution for how to access dynamic config which you can set in your module. Here is the link:
Said post references an article by Reiner Merz that discusses this very topic:
I am able to override the CSUIExtensions object in my module to add my own code to the GetDynamicConfiguration() script which returns an assoc with turns into a JSON object in SmartUI.
Both Pierre's post and Reiner's blog make reference to a module object and its config method, i.e.
var config = module.config();
If I add this to my Command JS object, module is not found. I probably need to "require" or "csui.define" something to get that config, but what? I have scoured the KC and the forums for a sample illustrating how you access this module object or even the config and so far, the only things I find on config are about a local config.js file that you define, whereas I need something which is defined server-side.
I could also use some guidance on what we *should* be putting in this dynamic config object. In Reiner's blog, the unmodified GetDynamicConfig() returns undefined. Since at least CS 16.2.10 and higher, it now returns an Assoc that actually resembles what Reiner added in his blog (is he OT's latest secret Smart UI development lead). In that default object, the keys are all paths, things like "csui/lib/some/param", which leads me to wonder if only bits which match a particular oath are supposed to show, while others should be ignored.
It would be helpful if OpenText could post a *full* example on how you access this dynamic config from your custom command and/or widget, *including* what requireJS dependencies we need to define.
Thanks
-Hugh