Start page
Start page

Start page / Template development / Scripting / Making scripts / Context / server

Server script

The server context can be used to access information and methods made available by the FirstSpirit server.

The server context applies to generation, preview generation, deployment, interval-controlled task control and access control.

However, changes to input components, menu-controlled generation of content, etc. do not belong in the server context but instead are covered by the client context.

Server-side scripts can be used to realize advanced functions or to modularize templates.

Typical examples of server-size scripts are:

  • manipulation of character strings
  • execution of arithmetic operations (calculations)
  • modification of the generation context

Generation script

A generation script may be used while generating a preview or publishing content to files and enables access to information available at the time of generation. This allows programmatic insertion of additional content, e.g. from the Content Store, into a document during preview or file generation or access to status information about the current process. The automatic generation can be made dependent on specific terms or certain conditions (e.g. the current date), for example.

Generation scripts thus serve primarily to aid the template development process are are included in templates' output channel definitions using the instruction $CMS_RENDER()$.

Type

Context

Template

GenerationScriptContext

  

Schedule script

Schedule scripts can be executed manually or in specified intervals by the FirstSpirit server. These scripts are defined as schedule actions in server or project-specific settings.

Use cases of schedule scripts include sub-site deployments and backups. Schedule scripts can also carry out custom functionality without association with other schedule actions.

Type

Context

None

ScheduleContext

  

Special scripts

Special scripts cover special aspects of FirstSpirit.

PermissionService script

A PermissionService script is used to generate user group files from a database structure for the permissions input component.

It is executed by the FirstSpirit server at regular, specified intervals.

A PermissionService script is part of the PermissionService.

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