Start page
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;
e = context.getStoreElement();
if (e instanceof PageRef) {
context.setProperty("visible", true);
}

© 2005 - 2012 e-Spirit AG | All rights reserved. | Last change: 15.12.2010