Publish Switch: Page & Component

How far away are we from having “draft” switches in the Elements UI to prevent publishing of Pages or Components? :slightly_smiling_face:

You can already set pages to “draft” by clicking the cloud icon. And just to clarify, this is what the two options do:

Eye - hide from menu
Cloud - do not publish (aka set to draft)

CleanShot 2025-04-07 at 5 .47.08

If you want to stop Components in the page from being published you could create yourself a custom component with an if statement and a dropzone, something like this:

@if(edit)
   @dropzone(name: "only visible in edit")  
@endif

I’ve not tested it, but it would display content in the dropzone while in Edit mode, but if Previewed or Published nothing would be output.

Hope that helps.

The only problem (and it is a major one!) with the dropzone is that you can’t see any of the components that are in the dropzone in the Node Browser (at least for an Element DevPack that has drop zones in its properties). :thinking:

Just to clarify, here is an image:

Try a restart. I had that also a few times. With a restart it was mostly solved. But I did not figure out a pattern yet.

Mainly after designing a devpack component and using it the first time.

Thanks for the suggestion. :slight_smile:

Yes, this is with a DevPack development (my Alloy replacement Blog). I have done numerous restarts as it has been like this for weeks. Initially you could see nodes dropped in the dropzone but once they disappeared they never come back. Even clearing everything out of the dropzone and re-adding doesn’t show anything.

The only way I can edit the structure of contents in the dropzone, is to select the Component at the top of the breadcrumb (Container A) in the image and cut and paste it into an area outside of the dropzone, edit it and then paste it back in. I can only easily select Components in the dropzone by selecting Components in the breadcrumb. This is a workaround in development but would be unusable as a published component. :frowning:

Do you have the same dropzone at more then one place? BUT seperated with @if ... @else logic? I think that could also cause it. I have seen that one before as well.

Dan, not quite sure why an option to publish or not publish is labeled as CLOUD. Not very intuitive in my view.
It is far more intuitive in Classic, DRAFT.