Start page / Templates (basics) / Composition of templates / Scripts

Structure of scripts

Scripts allow functions that are not yet present in FirstSpirit to be implemented quickly. They can, for example, also be used for complex migration scenarios and connecting external systems.

FirstSpirit supports a script language called BeanShell. The syntax of this language is heavily based on JAVA but is much more straightforward in many ways thanks to features such as dynamic typing for global variables and functions instead of static typing, as well as (limited) reflexive access to the program itself plus many other functions besides.

Scripting with BeanShell provides a high degree of flexibility for template developers. Working with scripts is not a trivial matter, however. Therefore, a careful check should be carried out to see whether a corresponding function is already available in FirstSpirit before implementing a script.

Important FirstSpirit scripts are a lightweight way of integrating new functionalities into FirstSpirit. For reasons of stability, however, it is recommended that functionalities that are required and used in the long term be implemented as a FirstSpirit module with executable or plugin.

There are different tabs in the SiteArchitect workspace for each script. These tabs can be used to configure all the necessary settings and definitions.

  • Properties: All of the settings required for the script can be made here.
  • Form: The input components that are to be called during the script runtime are defined here.
  • Rules: Rules can be defined to influence elements or properties.
  • Template set: This contains the actual BeanShell source code for the template sets.

For more detailed information on developing scripts in BeanShell, see Scripting under Template development.

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy