I know it's not recommended but I need to overwrite base.js (weblayout\resources\schema\base.js). One function is in error.
How? And especially, how to deploy it correctly with a component because everytime I modify the file manually, it's overwritten at the restart of Content server.
Thanks to all.
You should actually do this in a component. That way, your change isn't overwritten.
The base.js file is generated by the system reading the template file identified as "SCHEMA_BASE_JS" in the layouts template definition file. The actual template file is located in "<MIDDLEWARE_HOME>\Oracle_ECM1\ucm\idc\resources\core\templates\schema_base.js"
I'm assuming you know how to create components. So in a nutshell...
- Create a new component.
- In the component, define a new template named "SCHEMA_BASE_JS". Base the template on the file mentioned above.
- In the Merge Rules Section, merge your template resource table into the table "IdcLayoutTemplates"
At this point, after enabling the component and restarting the managed server, you have technically overridden the OOTB template. Now make your changes in the template file in your custom component. After making your changes, remember to republish the weblayout files.