Skip to content

Help templatecode

Brent Cordis edited this page Mar 2, 2026 · 4 revisions

Template Code (Edit)

Overview

The Template Code edit screen allows advanced users to create and edit custom PHP template files that control exactly how Proclaim content renders on the frontend. Template codes provide full control over HTML markup and PHP logic, going beyond the visual Layout Editor.

How to Access

Components -> Proclaim -> Template Codes, then click New or click an existing filename.

Toolbar

Button Action
Save Saves and stays on the edit screen
Save & Close Saves and returns to the template codes list
Save & New Saves and opens a blank form
Cancel Discards changes and returns to the list
Help Opens this help page

Fields

Field Description
Filename A descriptive name for this template code.
Type The template type (determines available code snippets). Cannot be changed after creation.
Template Code PHP/HTML code editor (CodeMirror) with syntax highlighting.
Status Published, Unpublished, or Trashed.

Template Types

Type Description
Sermon List Controls the list view displaying multiple messages
Sermon Controls the detail view for a single message
Teachers List Controls the list view displaying teachers
Teacher Controls the detail view for a single teacher
Series List Controls the list view displaying series
Series Display Controls the detail view for a single series
Module Controls the output of the Proclaim module

Code Snippet Panel

The right sidebar contains clickable insertion buttons organized by category. Clicking a button inserts the corresponding PHP code at the cursor position. Available snippets vary by template type.

Study/Sermon Snippets

Snippet Variable
Title $study->studytitle
Date $study->studydate
Scripture $study->scripture1
Media $study->media
Topics $study->topics
Teacher $study->teachername
Location $study->location_text
Hits $study->hits
Thumbnail $study->study_thumbnail
Intro $study->studyintro

Page Controls (List views)

Snippet Variable
Search Tools $this->page->searchtools
Pagination $this->page->pagelinks
Limit Box $this->page->limitbox

Detail View

Snippet Variable
Full Text $this->item->studytext
Print $this->page->print
Social $this->page->social

Teacher Snippets

Snippet Variable
Name $teacher->teachername
Image $teacher->image
Biography $this->item->information
Short Bio $this->item->short

Series Snippets

Snippet Variable
Title $series->series_text
Description $series->description
Image $series->image

Tips

  • Always back up your template code before making changes.
  • Test in development before deploying to production.
  • The Type is locked after creation because changing it would invalidate existing code variables.
  • Use the snippet panel instead of typing variable names manually.
  • Do not modify default template codes -- create copies and customize those instead.
  • Template codes must be linked to a template via the Template edit screen to take effect.

Related

Clone this wiki locally