A collection of utility scripts for managing Visual Modeler layouts and configurations.
A utility script that copies Visual Modeler layout data from one space/environment combination to another.
-
Open the Contentful app in your browser, for example on the entries list. Make sure the Visual Modeler page is NOT open in any tab.
-
Open your browser's Developer Console:
- Chrome/Edge: Press
F12
orCtrl+Shift+I
(Windows/Linux) /Cmd+Option+I
(Mac) - Firefox: Press
F12
orCtrl+Shift+K
(Windows/Linux) /Cmd+Option+K
(Mac) - Safari: Press
Cmd+Option+I
(Mac) or enable Developer menu in Preferences > Advanced
- Chrome/Edge: Press
-
Copy the entire script content from
copyVisualModelerLayout.js
-
Modify the parameters at the bottom of the script:
copyVisualModelerLayout( "sourceSpaceId", "sourceEnvId", "targetSpaceId", "targetEnvId" );
Replace the placeholder values with your actual space and environment ids:
"sourceSpaceId"
→ Your source space id"sourceEnvId"
→ Your source environment id"targetSpaceId"
→ Your target space id"targetEnvid"
→ Your target environment name
-
Paste the updated script into the console and press Enter
If you see an error like "Deletion of visual-modeler.layout.***.*** blocked."
, this means the Visual Modeler is still open. Close all Visual Modeler tabs, refresh the Contentful app and try running the script again.