One more idea after talking about this with our Dev Team.
Hi Rob -
Looking at a way to leverage this type of functionality but for non-managed package (empty namespace). Is there any way to have skuid automatically include static resources for resources that have an empty namespace? Something similar in functionality to the way the builder JS automatically gets included (BuildersJS).
Barry, The idea of a module (collection of pages) is not reserved for managed packages. You can create one or more modules in your set of random skuid pages and have these call static resources that have the module name prefixed to them. This might sound like namespacing, but it is not reserved for managed packages.
It does mean that new pages would have to be included in the module in order to take advantage of the resources. You can probably force that by adding a default value to the picklist definitio of the Module field of the Pages object.
Hope that helps.
Thanks Rob. Understood regarding modules not reserved for managed packages, we leverage this for our builders using a custom module name. Possibly I’m over-thinking things or missing something obvious (wouldn’t be the first time), but assuming my skuid page is in a module, what’s the convention I would need to use for my static resource names to have them automatically pulled in without having to specify them in the resources area of the page builder for a given page?
For example, to have the builder automatically pulled in my custom components, I have a static resource named BuildersJS.
Dang undocumented features.
If you have a Module of name “Foo” Create Static Resources with names as follows:
These resources will be automatically included in all pages in the Module.
Note: Edited after Barry pointed out my error below!
Thanks Rob, I got it working!
Couple of notes:
1) I named the resources FooJS and FooCSS (no period in-between as it’s invalid character for static resources).
2) I had actually tried this before posting to this thread thinking that was the pattern for naming but it appeared it wasn’t working. I realized my mistake was that I had cloned a page from the no-namespace module and created the cloned page (exact same content with same pagename) in the foo module. When hitting the preview button from the builder on the foo namespaced page, the preview was pulling in the non-namespace page instead of the foo namespaced page. Didn’t realize this and hence thought it wasn’t working. After changing the name of the page in the foo namespace and hitting preview, presto, auto-include! The take away here (besides me not paying close enough attention) is that the preview button doesn’t seem to force the namespace of the current page when opening the target window. Hence, if there is a page name conflict, the wrong page could get pulled in. Something you guys might want to take a look at
Thanks again for all your help!
Ack. Thanks for pointing out the error. I’ve fixed my comment above for posterity. FooJS is right…
We will look into the preview issue. We’ve known that you could have same page name in different modules. But the preview confusion is troublesome.