Skip to content

Help templatecode

Brent Cordis edited this page Aug 19, 2026 · 4 revisions

Template Code (Edit)

Description

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.

Screenshot

The templatecode screen

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

What You Can Do Here

I want to… Go to
Write a custom template file Write the file
Find the variables I can use Screen Reference

Write the file

  1. Enter a Filename without .php, and pick the Type for the view it applies to.
  2. Write your PHP and HTML in the editor. Use the snippet panel for the placeholders available to that type.
  3. Save & Close.
  4. Select it in a template's Template Overrides.

Important

Start every template code file with <?php defined('_JEXEC') or die;. Proclaim adds it if you forget, but it is better to write it yourself.

Tip

Styling belongs in Custom CSS, not in here. CSS in Proclaim's settings survives updates and is included in backups.

Screen Reference

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
General Items tab

The General Items tab

The filename, the type it applies to, and the code editor itself.

Publishing tab

The Publishing tab

Created and modified details for this template code file.

Access Control tab

The Access Control tab

Who may view and edit this template code file.

Quick 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 Information

Clone this wiki locally