Publish Warning Component

If you manage a site that has lot's of different users actively using the site, you probably know it can be frustrating when someone publishes the site while you're in the middle of making a big change. We've created this publish warning component that helps solve this problem. It only shows this warning in the designer and editor. Check out the steps below to see how you can impliment it.

Step 1

Build out the warning card

Build out a warning card however you would like - big or small, whatever works for you. Make sure to add aria-hidden: "true" to the card as well.

Step 2

Create component and add to all pages

Convert your card to a component and add it to all pages.

Step 3

Add this code to the head of your project settings

Just make sure the you update the class to match the classes you used to build the publish warning card.

<style>

.amply_warning-message { display: none; }
.w-editor .amply_warning-message { display: inherit !important }

</style>
Step 4

Publish and enjoy!

Now you can toggle the component to be visible whenever you want to prevent people from publishing the site.