The Templates Module

Built with 100% Native PHP, The Templates Module delivers ready-to-use admin and public templates with responsive navigation, theme support, and intelligent asset loading.

Instructions on how to use this module are offered in the Templates Chapter of the Trongate Framework Documentation.

admin()

Displays the admin theme template with provided data. This method loads the full admin panel layout, complete with header, sidebar, footer, and mobile navigation. It processes optional theme settings and additional CSS/JavaScript includes before rendering the template. The method automatically injects your view content into the admin layout using the display() helper.

error_404()

Displays the 404 error page. This method is automatically invoked by Trongate when a requested URL cannot be matched to any existing route. It loads the error_404 template view, which provides a user-friendly message indicating that the requested page could not be found. The method can be customised by editing the template view file or by changing the ERROR_404 constant in the configuration file to point to a different module and method.

public()

Displays the public theme template with provided data. This method loads a clean, public-facing layout designed for websites and landing pages. It processes additional CSS/JavaScript includes before rendering the template. The method automatically injects your view content into the public layout using the display() helper. Unlike the admin template, the public template provides a minimal structure, giving you maximum flexibility for front-end design.