Skip to content

contentful-labs/visual-modeler-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

visual-modeler-scripts

A collection of utility scripts for managing Visual Modeler layouts and configurations.

Scripts

copyVisualModelerLayout.js

A utility script that copies Visual Modeler layout data from one space/environment combination to another.

How to Run

  1. 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.

  2. Open your browser's Developer Console:

    • Chrome/Edge: Press F12 or Ctrl+Shift+I (Windows/Linux) / Cmd+Option+I (Mac)
    • Firefox: Press F12 or Ctrl+Shift+K (Windows/Linux) / Cmd+Option+K (Mac)
    • Safari: Press Cmd+Option+I (Mac) or enable Developer menu in Preferences > Advanced
  3. Copy the entire script content from copyVisualModelerLayout.js

  4. 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
  5. Paste the updated script into the console and press Enter

Troubleshooting

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.

About

Scripts related to Visual Modeler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published