Start page / Advanced topics / Input assistance / Output tabs

Code completion on output tabs

Contents

Code completion on output tabs enables instructions (CMS tags) to be displayed and inserted at the insert mark with a keystroke. The $ character must be entered as a minimum up to and including FirstSpirit version 5.2R1.

Available from FirstSpirit Version 5.2R2 In FirstSpirit version 5.2R2 and higher, the following elements can also be displayed and added:

  • Identifiers of input components defined on the template's form tab
  • Methods that can be executed on the return value/data type of the corresponding input component
  • Functions that can be used in instructions

Code completion output

Add instructions

Press the Ctrl+Space key combination to open a window displaying all the available input components or CMS tags (“instructions”). It also shows which CMS tags can be sensibly combined.

The desired tag can then be applied using the keyboard (up or down cursor key and Enter) or the mouse (double-click or click and Enter) on the form tab. Combinations of tags are added on multiple lines one after the other.

The insert mark is then located after the opening bracket in which the required expression can then be entered directly.
Available from FirstSpirit Version 5.2R2 In FirstSpirit version 5.2R2 and higher, a second list of suggestions can be opened by pressing Ctrl+Space. This list contains the identifiers of the input components defined on the template's form tab and the available functions. See below for more information.

The number of tags displayed can be restricted by entering the first letter or letters of the required CMS tag. For example, entering

$CMS_IF 

then pressing Ctrl+Space displays the following suggestions:

$CMS_IF()$ $CMS_ELSE$ $CMS_END_IF$
$CMS_IF()$ $CMS_ELSIF()$ $CMS_ELSE$$CMS_END_IF$
$CMS_IF()$ $CMS_END_IF$

Available from FirstSpirit Version 5.2R2 In FirstSpirit version 5.2R2 and higher, the list of suggestions can be filtered and/or searched by entering text. See the introduction page for more information.

Entering

$CMS_FOR

then pressing Ctrl and Space adds $CMS_FOR directly to

$CMS_FOR(,)$
$CMS_END_FOR$

Input component identifiers and functions

Available from FirstSpirit Version 5.2R2

Press Ctrl+Space to display and enter the identifiers of input components defined on the template's form tab.
The insert mark must be positioned inside the round brackets of an instruction.
The data types/return values for the input component types are also displayed for the identifiers in the list of suggestions, e.g.,

These data types are relevant for template development on template sets (HTML, PDF, etc.). The documentation for these data types including the methods that can be executed on the data type returned by the input component are listed in the Data types chapter.

The functions that are available in the instruction are also included in the list, along with other keywords (e.g., #global).

Add methods

Available from FirstSpirit Version 5.2R2

Methods that are available for the identifiers of input components defined on the template's form tab as well as for methods in instructions can be displayed and added to the code at the insert mark by pressing Ctrl+Space.
A period (.) must be inserted in front of the insert mark.

Enter

$CMS_VALUE(st_text.

and press Ctrl+Space, for example, to display a list of all methods that can be executed on the return value of “st_text” (can be a CMS_INPUT_TEXT type input component, for example) (e.g., toLowerCase)

$CMS_VALUE(st_text.toLowerCase())$ 

After every period, another list of suggestions showing the available methods can be displayed by pressing Ctrl+Space.

Display information

Available from FirstSpirit Version 5.2R2

Additional information can be displayed in a tooltip on the output tab for the following elements by pressing Ctrl+Q:

  • Input component identifiers
    (tooltip shows the input component type and the return value/data type)
  • Methods
    (tooltip shows the return value/data type)

If the return value is a known value, it is possible to determine which methods can continue to be used.

Code completion tooltip output channel

Additional information can be displayed in a tooltip in the list of suggestions for the following elements by pressing Ctrl+Q:

  • Input component identifiers

Click Ctrl+P to uniquely identify methods with the same name.

The template must be in editing mode in order for information to be displayed.

Important The FirstSpirit template inspector and the FirstSpirit template debugger support options for analyzing existing code on template set tabs.

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