Start page / Template development / Scripting

Scripting in FirstSpirit

Scripts can be used to automate different types of operating sequences / user input sequences in FirstSpirit. A script is used to describe the sequence to be executed and if necessary can make changes to the FirstSpirit data structure. Scripts enable fast implementation of functions which are not yet available in FirstSpirit. Further areas of use are, for example, complex migration scenarios and the interfacing of external systems.

Script language BeanShell

The supported script language in FirstSpirit is BeanShell. The BeanShell syntax is highly based on JAVA but offers numerous simplifications, for example, dynamic instead of static typification of global variables and functions, as well as (limited) reflexive access to the program itself and many other functions:

Further information on this script language is available on the website, which also provides a detailed manual (EN).

Scripting with BeanShell offers a high degree of flexibility for the template developer. However, working with scripts is not trivial, therefore, before using a script it is necessary to check whether a corresponding function already exists in FirstSpirit!

Script contexts

Scripts can be used in different contexts of FirstSpirit:

  • Template scripts, menu scripts and context menu scripts run in SiteArchitect and in ContentCreator and, among other things, can make input windows available to the editor. These types of scripts are therefore very suitable for project-specific automation of frequently recurring operations within the editorial process. These scripts can be inserted or hidden in the context menu on the basis of additional information (e.g. logged in user, type of currently selected object).
  • Service scripts (in the background of the FirstSpirit server)
  • Pre or postdeployment scripts

© 2005 - 2021 e-Spirit AG | All rights reserved. | FirstSpirit 2021-02 | Data privacy | Imprint | Contact us