View logic
An insert logic can be defined in the "Properties" tab of a script. This can limit the display of the script in the context menu to special areas or make it dependent on specific prerequisites. For example, a context menu script is only to be displayed if the context menu was opened on a structure node. The following example limits the display for this case. The "Always Active" checkbox must be disabled.
//!Beanshell
import de.espirit.firstspirit.access.store.sitestore.PageRef;
storeElement = context.getStoreElement();
return (storeElement instanceof PageRef);