Start page / Template development / Debugging / Where is the error? / Template Inspector

The Template Inspector

Template Inspector

The Template Inspector can be called in the integrated preview by right-clicking in the HTML preview with the mouse.

The Template Inspector displays the following information in a pop-up window:

  • Templates structure (in the example: “Homepage” page template and “Text / Image (homepage teaser”) section template
  • HTML tag structure (in the example: <HTML>, <BODY>, <DIV>, <IMG>)
  • Number of the line and column in which the code is located on the HTML tab in the workspace

The pop-up must be closed manually by clicking the X symbol. It can be moved to a different position with the mouse pointer if required.

If the mouse pointer stops above an entry in the template, a border will appear around the corresponding area in the preview (“highlighting”), if the template/s is/are configured appropriately (see page about Content Highlighting).

Template Inspector HTML Tab

Click on an entry in the Template Inspector to jump to the corresponding code location on the HTML tab of the corresponding template in the workspace.

The debugger functionality can be started from here to investigate the code in more detail.

Activating Template Inspector / Permissions

Available from FirstSpirit Version 5.2R2 FirstSpirit version 5.2R2 can be configured so that only certain user groups are able to access and execute this function in SiteArchitect. (In earlier versions, it is available to every user in a project.)

ServerManager project component permissions

The corresponding configuration settings are made with the “FS-TemplateDebuggerProjectPermissions” project component that is included in the scope of delivery. It must be added to the required project in the FirstSpirit ServerManager (under “Project components”). Click “Configure” or double-click the project component to open a dialog in which the required group(s) can be selected (see figure).

The groups that have access to the project are displayed on the left-hand side (“Available groups”), the groups that are permitted to use the corresponding function are displayed on the right-hand side (“Allowed for these groups”) along with their ID and the number of users they contain. To check which users belong to a group, select “Show users” from the context menu.

The icon is displayed on the horizontal tool bar in SiteArchitect for members of the “allowed groups” (right-hand side). The corresponding icon is hidden for users who are not in one of the selected groups. To move a group to the right-hand side or left-hand side, select it and

  • click the icons ,
  • double-click or
  • select the corresponding command from the context menu (“Allow group(s)” or “Remove group(s) from allowed”).

The “Template Inspector” and the Template Debugger functionality are interdependent, it is only possible to specify the same permissions.

Deactivating the Template Inspector on a case-by-case basis

The source text of a template set can contain XML control characters ("). If the “Template Inspection” (SiteArchitect, integrated preview, “Template Inspection” context menu entry) is being used, control information is added to the tags. Depending on the (web-programming) language used, these characters may have to be quoted.

Available from FirstSpirit Version 5.1R3 However, as not all languages are able to or should be expanded, the “Template Inspection” functionality can be deactivated from FirstSpirit version 5.1R3 on a case-by-case basis as follows:

  • for a template set in the project using the “Template Inspection” option in ServerManager / Project properties / Template sets,
  • temporarily in the output (in the template itself) by calling

$CMS_SET(#global.htmlMode, false)$

The Template Inspector is deactivated from this point. It can be reactivated by calling

$CMS_SET(#global.htmlMode, true)$

For more information, also see FirstSpirit Access API,

  • Interface GenerationContext (Package de.espirit.firstspirit.access):
    methods isHtmlMode and setHtmlMode
  • Interface TemplateSet (Package de.espirit.firstspirit.access.project):
    methods isTemplateInspectionEnabled and setTemplateInspectionEnabled

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