Skip to content
firstspirit-templating logo

FirstSpirit Templating

firstspirit-templating

This skill provides comprehensive knowledge for templating in the FirstSpirit CMS, specifically focused on SiteArchitect development. This skill should be used when working with FirstSpirit templates including page templates, section templates, format templates, link templates, input components, ...

SKILL.md

Full skill instructions

FirstSpirit Templating

Overview

This skill provides comprehensive guidance for developing templates in FirstSpirit CMS using SiteArchitect. FirstSpirit uses a unique templating system that separates content, layout, and structure across multiple stores (Template Store, Content Store, Site Store, Media Store). Template development involves creating reusable components using FirstSpirit's template syntax, input components, and configuration options.

When to Use This Skill

Use this skill when:

  • Developing FirstSpirit templates (page, section, format, link templates)
  • Working with FirstSpirit template syntax and instructions
  • Configuring input components and forms in SiteArchitect
  • Creating dynamic forms using rules and validation
  • Implementing workflows and approval processes
  • Working with FirstSpirit's store architecture
  • Using system objects, variables, and functions in templates
  • Debugging FirstSpirit templates

How to Use This Skill

The skill organizes FirstSpirit templating knowledge into topic-specific reference files. When working on a specific aspect of FirstSpirit templating, read the relevant reference file(s) to gain detailed knowledge about that topic.

Reference Documentation Topics

IMPORTANT: Read the reference and do not use your global knowledge about other templating systems, as FirstSpirit has its own unique concepts and syntax.

1. Core Architecture

General Structure (references/​general-structure.md)

  • FirstSpirit's six-store architecture (Template Store, Content Store, Site Store, Media Store, Global Settings)
  • Separation of content and layout principles
  • Core concepts: content-first approach, multi-user collaboration, multilingual architecture
  • Best practices for organizing each store

Template Development Basics (references/​template-development-basics.md)

  • Introduction to template development fundamentals
  • Development tools: SiteArchitect, ContentCreator, debugging tools
  • Template components overview (Forms, Rules, Snippets, Template Syntax)
  • Development workflows and best practices

Template Structure (references/​template-structure.md)

  • Template composition and organization
  • Seven template types (page, section, format, link, scripts, database schemata, workflows)
  • Five-tab structure (Properties, Form, Rules, Snippet, Template Set)
  • Template development workflow from planning through deployment

2. Template Types

Page Templates (references/​page-templates.md)

  • Page template basics and framework structure
  • Five-tab structure (Properties, Form, Rules, Snippet, Template Set)
  • Input components for page configuration
  • Content insertion locations for editors
  • Snippet tab for preview content

Section Templates (references/​section-templates.md)

  • Section template fundamentals
  • Adding content to page framework
  • Input components for dynamic content (text, images, tables, datasets)
  • Template set architecture with CMS_HEADER and output areas
  • Integration with page templates

Format Templates (references/​format-templates.md)

  • Text formatting options for editors
  • Section vs. individual text formatting
  • Default format templates and HTML templates
  • Table format templates with display rules and style application

Link Templates (references/​link-templates.md)

  • Eight supported link types (internal, image, download, external, email, dataset, remote, image map)
  • Five-area configuration structure
  • Usage through input components (CMS_INPUT_LINK, CMS_INPUT_DOM, FS_CATALOG)
  • Language handling and preview management

Script Templates (references/​script-templates.md)

  • BeanShell scripting fundamentals
  • Four-tab script configuration system
  • Implementing custom functions
  • Migration scenarios and external system integration

Table Templates (references/​table-templates.md)

  • Database schema templates and abstraction layers
  • Table template configuration (six configuration tabs)
  • Database integration workflow from schema creation through query configuration
  • Inline tables with format and style requirements

Workflows (references/​workflows.md)

  • Workflow structure and configuration
  • Approval and release processes
  • BasicWorkflows module documentation
  • Permissions, validation, and error handling

3. Template Syntax

Instructions (references/​template-syntax-instructions.md)

  • Complete reference for FirstSpirit template instructions
  • Core instructions: $CMS_VALUE$, $CMS_SET$, $CMS_IF$, $CMS_FOR$, $CMS_SWITCH$
  • Template operations: $CMS_RENDER$, $CMS_INCLUDE$, $CMS_REF$
  • Control flow patterns and variable management
  • Syntax, parameters, and usage examples for each instruction

Expressions and Data Types (references/​template-syntax-expressions.md)

  • All FirstSpirit data types: Boolean, String, Number, Date, List, Map, Set
  • Expression syntax and operations
  • Lambda expressions and data transformations
  • Type conversions and methods
  • Real-world use cases for data manipulation

Functions (references/​template-syntax-functions.md)

  • Template functions: editorId(), if()
  • Function syntax and parameters
  • ContentCreator content highlighting with editorId()
  • Conditional logic with inline if() function
  • Combining functions effectively

System Objects (references/​template-syntax-system-objects.md)

  • Complete reference for FirstSpirit system objects
  • #global (project/​page/​preview information)
  • #field (form component access)
  • #for (loop control)
  • #style (table styling)
  • #content (DOM Editor content)
  • #this (context object)
  • Practical code examples and common patterns

Variables (references/​variables.md)

  • Variable identifier naming rules and conventions
  • Variable definition in Form, Header, and Body areas
  • Output methods using $CMS_VALUE$ and $CMS_REF$
  • Variable scope and lifecycle management
  • Metadata variables with inheritance models

4. Forms and Components

Rules and Dynamic Forms (references/​rules.md)

  • Rules for creating dynamic forms
  • Rule structure: execution timing, preconditions, value determination, handling
  • Form properties manipulation
  • Validation mechanisms with severity levels (SAVE, RELEASE, INFO)
  • Practical examples: conditional visibility, dependent dropdowns, date validation
  • Best practices for multi-language support and performance

Metadata (references/​metadata.md)

  • Creating and configuring metadata templates
  • System-assigned and user-defined metadata
  • .meta() method for accessing metadata values
  • Three inheritance modes (none, inherit, add)
  • ELEMENTTYPE and TEMPLATE properties for dynamic forms
  • SEO metadata and media-specific metadata examples

Snippets (references/​snippets.md)

  • Snippet components: thumbnails, labels, extracts
  • Snippet tab configuration
  • Implementation patterns using form variables and methods
  • Advanced techniques: empty checks, type validation, multilingual support
  • Best practices for teaser design and preview content

5. Development Tools

Template Wizard (references/​template-wizard.md)

  • HTML import capabilities and automated component generation
  • Form Builder functionality for reusable form templates
  • Workflows for common scenarios
  • Best practices for wizard-based template creation
  • Limitations requiring manual SiteArchitect intervention

Official Documentation

All reference files are based on official FirstSpirit documentation from e-Spirit/​Crownpeak:

Typical Development Workflow

  1. Understand the architecture - Start with general-structure.md and template-development-basics.md
  2. Choose template type - Read the appropriate template reference (page, section, format, link)
  3. Learn the syntax - Review template syntax instructions, expressions, and system objects
  4. Add interactivity - Use rules and dynamic forms for advanced functionality
  5. Test and debug - Use Template Inspector and FirstSpirit Debugger
  6. Deploy - Follow workflow and release processes

Best Practices

  • Separation of concerns: Keep content (Content Store), layout (Template Store), and structure (Site Store) separate
  • Reusability: Design section templates to be reusable across multiple pages
  • Multilingual support: Always consider language handling in templates
  • Validation: Use rules for form validation and provide clear error messages
  • Documentation: Use meaningful variable names and add comments in templates
  • Testing: Test templates in both SiteArchitect and ContentCreator environments
  • Performance: Minimize complex calculations in templates; move logic to scripts or modules when appropriate

Common Use Cases

Creating a New Page Template

  1. Read page-templates.md for structure
  2. Review input-components.md for form elements (note: detailed component reference not included in this skill version)
  3. Check template-syntax-instructions.md for output syntax
  4. Use snippets.md for preview configuration

Building Dynamic Forms

  1. Start with rules.md for dynamic form behavior
  2. Review variables.md for state management
  3. Check metadata.md for metadata integration
  4. Reference template-syntax-system-objects.md for accessing form data

Working with Template Output

  1. Review template-syntax-instructions.md for core instructions
  2. Check template-syntax-system-objects.md for data access
  3. Use template-syntax-expressions.md for data transformation
  4. Reference format-templates.md and link-templates.md for content formatting

Getting Help

When encountering issues:

  1. Check the relevant reference file for detailed documentation
  2. Review official FirstSpirit documentation links provided in reference files
  3. Use the Template Inspector and Debugger tools in SiteArchitect
  4. Verify template syntax and system object usage against the syntax references

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View