Is there any way to set the template bindings in an extension?
I tried using IPSAssemblyItem.getBindings(), but this didn’t seem to effect the bindings in the template. IPSAssemblyTemplate has a getBindings() method, but that requires that I have an IPSTemplateBinding object, for which there is no class exposed in the API (Would it work to create my own IPSTemplateBinding class… or is this even the right path?)
What I’m trying to do is have an extension that will set some variables that our templates use a lot.
For now, I’m going to just return a hash and set it explicitly in the bindings. I guess that would work pretty well.
I could swear that I tried that. My JEXL method does take $sys.assemblyItem. At first, I just tried getBindings and updated the hashmap. When that didn’t work, I tried calling setBindings.