When trying the following conditional statements:
@if(edit)
<h2 style="color:#9a27a1">Show this in Edit</h2><!-- Shows in Edit -->
@elseif(preview)
<h2 style="color:#00ff00">Show this in Preview</h2><!-- Doesn't show in Preview -->
@else
<h2 style="color:#ff0000">Show this in Publish</h2><!-- Shows in Preview & Publish -->
@endif
-
The @ elseif(preview) is not showing up in Preview at all.
-
The @ else is showing in both Preview & Publish - this really needs to only be for Publish things, as preview use case is often used to display informational messages, etc. Maybe a dedicated @ if / @ elseif (publish) would be clearer and easier when setting things up.
-
the @ elseif(somecontrol) is Not showing in Edit when enabled, I used a switch