Start page
Start page

Start page / Template development / Scripting / Making scripts / Insert logic

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);

© 2005 - 2014 e-Spirit AG | All rights reserved. | Last change: 2013-07-10