Cotonti Template Reference: Names, purpose, and examples of calling a custom function

Examples of calling a custom functions. In Cotonti, every template file has a unique name that is used for identification and loading by the system.

Rating based on reviews:
Total stars received: 0
Total reviews: 0
Average rating: 0
Filed under: User Blog

Cotonti Template Reference: Names, Purposes, and Call Examples

Introduction

In Cotonti, every template file has a unique name that is used for identification and loading by the system. Knowing the correct template names is critical for developers and layout designers, as it allows you to:

  • Quickly find the right file for editing;
  • Properly use the cot_tpl_url() function to get the template path;
  • Create new templates following Cotonti naming conventions;
  • Efficiently debug layout by understanding which template is responsible for a particular page or block.

This reference collects all the main template names, their purposes, and examples of calling the cot_tpl_url() function for various extension types. The material is divided into categories for easy searching:

  • Modules (module) — main site sections (pages, forums, users, etc.);
  • Plugins (plug) — additional functional blocks;
  • Core (core) — system templates used on all pages;
  • Admin panel — templates for site management.

This reference will help you quickly navigate your site's template structure and correctly use the cot_tpl_url() function in your code.


Table of Contents


General Syntax

{PHP|cot_tpl_url('template_name', 'type', admin)}
  • 'template_name' — the string name of the file without the .tpl extension (parts separated by dots). For example, 'page.list'.
  • 'type' — the extension type: 'module' (default), 'plug', 'core'.
  • admin — a boolean flag: true for admin templates (searches in the admin theme folder), otherwise omit or pass false/null.

Important: in Cotonti templates, you cannot pass arrays – only strings. If the name is generated dynamically, pass it via a template variable from PHP code:

$tpl_url = cot_tpl_url($dynamic_name, 'module');
$t->assign('DYNAMIC_TPL_URL', $tpl_url);

In the template:

{DYNAMIC_TPL_URL}

Module Templates

Page

  • page.tpl — displays a single site page: title, text, author, date, and comments.
    {PHP|cot_tpl_url('page')}
  • page.list.tpl — displays a list of pages within a selected category with pagination.
    {PHP|cot_tpl_url('page.list')}
  • page.add.tpl — shows the form for adding a new page by a user.
    {PHP|cot_tpl_url('page.add')}
  • page.edit.tpl — shows the form for editing an existing page.
    {PHP|cot_tpl_url('page.edit')}

Forums

  • forums.sections.tpl — displays the list of all forum sections with topic and post counts.
    {PHP|cot_tpl_url('forums.sections')}
  • forums.topics.tpl — displays the list of topics in a selected forum section.
    {PHP|cot_tpl_url('forums.topics')}
  • forums.posts.tpl — shows posts within a specific forum topic.
    {PHP|cot_tpl_url('forums.posts')}
  • forums.newtopic.tpl — displays the form to create a new topic in a forum section.
    {PHP|cot_tpl_url('forums.newtopic')}
  • forums.editpost.tpl — shows the form to edit an individual forum post.
    {PHP|cot_tpl_url('forums.editpost')}

Users

  • users.details.tpl — displays detailed user information: profile, stats, contacts.
    {PHP|cot_tpl_url('users.details')}
  • users.edit.tpl — displays the form for editing user profile data.
    {PHP|cot_tpl_url('users.edit')}
  • users.register.tpl — shows the registration form for a new account.
    {PHP|cot_tpl_url('users.register')}
  • users.profile.tpl — displays the public user profile for others to view.
    {PHP|cot_tpl_url('users.profile')}
  • users.passrecover.tpl — displays the password recovery form.
    {PHP|cot_tpl_url('users.passrecover')}

PM (Private Messages)

  • pm.list.tpl — shows the list of incoming and outgoing private messages.
    {PHP|cot_tpl_url('pm.list')}
  • pm.message.tpl — displays the content of a single private message.
    {PHP|cot_tpl_url('pm.message')}
  • pm.send.tpl — displays the form for sending a new private message.
    {PHP|cot_tpl_url('pm.send')}

PFS (File Manager)

  • pfs.tpl — the main file manager interface: file/folder listing and upload.
    {PHP|cot_tpl_url('pfs')}
  • pfs.view.tpl — displays the contents of a specific file or folder in the file manager.
    {PHP|cot_tpl_url('pfs.view')}

Polls

  • polls.tpl — displays a poll with answer options and voting results.
    {PHP|cot_tpl_url('polls')}

RSS

  • rss.tpl — generates an RSS feed of the latest site materials.
    {PHP|cot_tpl_url('rss')}

Index

  • index.tpl — the site homepage, usually displays recent materials and widgets.
    {PHP|cot_tpl_url('index')}

Plugin Templates

For plugins, always specify the type 'plug'.

Recent Items

  • recentitems.tpl — displays a list of recently added or updated site materials.
    {PHP|cot_tpl_url('recentitems', 'plug')}

Comments

  • comments.tpl — displays all comments for a specific material with a reply form.
    {PHP|cot_tpl_url('comments', 'plug')}
  • comments.edit.tpl — shows the form for editing an individual comment.
    {PHP|cot_tpl_url('comments.edit', 'plug')}

Tags

  • tags.tpl — displays a tag cloud or a list of materials associated with a selected tag.
    {PHP|cot_tpl_url('tags', 'plug')}

Sitemap

  • sitemap.tpl — displays the site map with links to all sections and materials.
    {PHP|cot_tpl_url('sitemap', 'plug')}
  • sitemap.index.tpl — shows the sitemap index for pagination across multiple pages.
    {PHP|cot_tpl_url('sitemap.index', 'plug')}

Ratings

  • ratings.tpl — displays material ratings and voting controls.
    {PHP|cot_tpl_url('ratings', 'plug')}

Contact

  • contact.tpl — displays the contact form for sending messages to the administration.
    {PHP|cot_tpl_url('contact', 'plug')}

Hits

  • hits.admin.tpl — admin panel for visit statistics: charts, counters, reports.
    {PHP|cot_tpl_url('hits.admin', 'plug', true)}

Banlist

  • banlist.admin.tpl — admin panel for managing banned users and IP addresses.
    {PHP|cot_tpl_url('banlist.admin', 'plug', true)}

System Templates (Core)

  • header.tpl — the common site header: logo, menu, meta tags, included on all pages.
    {PHP|cot_tpl_url('header', 'core')}
  • footer.tpl — the common site footer: copyright, extra links, scripts, included on all pages.
    {PHP|cot_tpl_url('footer', 'core')}
  • message.tpl — displays system messages, errors, and notifications to the user.
    {PHP|cot_tpl_url('message', 'core')}

Admin Panel Templates

Core Admin

  • admin.home.tpl — the admin panel homepage with system overview.
    {PHP|cot_tpl_url('admin.home', 'core', true)}
  • admin.main.tpl — the main layout of the admin panel: general markup, menu, sidebar.
    {PHP|cot_tpl_url('admin.main', 'core', true)}
  • admin.config.tpl — site configuration page.
    {PHP|cot_tpl_url('admin.config', 'core', true)}
  • admin.extensions.tpl — management of installed modules and plugins: enable, disable, configure.
    {PHP|cot_tpl_url('admin.extensions', 'core', true)}
  • admin.users.tpl — user management: edit, block, delete accounts.
    {PHP|cot_tpl_url('admin.users', 'core', true)}
  • admin.structure.tpl — site structure management: categories, sections, order and parameters.
    {PHP|cot_tpl_url('admin.structure', 'core', true)}
  • admin.extrafields.tpl — configuration of extra fields for various entities.
    {PHP|cot_tpl_url('admin.extrafields', 'core', true)}
  • admin.cache.tpl — cache management: clearing, setting cache lifetime.
    {PHP|cot_tpl_url('admin.cache', 'core', true)}
  • admin.cache.disk.tpl — details of disk cache: view and clear individual cache files.
    {PHP|cot_tpl_url('admin.cache.disk', 'core', true)}
  • admin.log.tpl — system event log: user actions, errors.
    {PHP|cot_tpl_url('admin.log', 'core', true)}
  • admin.rights.tpl — access rights configuration for user groups.
    {PHP|cot_tpl_url('admin.rights', 'core', true)}
  • admin.rightsbyitem.tpl — detailed access rights for a specific site item.
    {PHP|cot_tpl_url('admin.rightsbyitem', 'core', true)}
  • admin.other.tpl — other administrative settings not included elsewhere.
    {PHP|cot_tpl_url('admin.other', 'core', true)}
  • admin.phpinfo.tpl — displays PHP server configuration information.
    {PHP|cot_tpl_url('admin.phpinfo', 'core', true)}
  • admin.infos.tpl — displays summary information about the Cotonti system and environment.
    {PHP|cot_tpl_url('admin.infos', 'core', true)}

Module Admin Templates

  • page.admin.tpl — admin panel for page management: bulk operations, categories.
    {PHP|cot_tpl_url('page.admin', 'module', true)}
  • forums.admin.tpl — admin panel for forum management: sections, topics, moderation.
    {PHP|cot_tpl_url('forums.admin', 'module', true)}
  • polls.admin.tpl — admin panel for poll management: create and edit.
    {PHP|cot_tpl_url('polls.admin', 'module', true)}
  • pfs.admin.tpl — admin panel for file manager: settings, limits.
    {PHP|cot_tpl_url('pfs.admin', 'module', true)}

Plugin Admin Templates

  • recentitems.admin.tpl — admin panel for Recent Items plugin: configure display of recent items.
    {PHP|cot_tpl_url('recentitems.admin', 'plug', true)}
  • comments.admin.tpl — admin panel for Comments plugin: comment moderation.
    {PHP|cot_tpl_url('comments.admin', 'plug', true)}
  • tags.tools.tpl — tools for Tags plugin: bulk tag management.
    {PHP|cot_tpl_url('tags.tools', 'plug', true)}

Complete Template Summary Table

CategoryTemplate NamePurposeExample Call
Pagepage.tplDisplay a single page{PHP|cot_tpl_url('page')}
page.list.tplList of pages in a category{PHP|cot_tpl_url('page.list')}
page.add.tplForm to add a new page{PHP|cot_tpl_url('page.add')}
page.edit.tplForm to edit a page{PHP|cot_tpl_url('page.edit')}
Forumsforums.sections.tplList of forum sections{PHP|cot_tpl_url('forums.sections')}
forums.topics.tplList of topics in a section{PHP|cot_tpl_url('forums.topics')}
forums.posts.tplPosts inside a topic{PHP|cot_tpl_url('forums.posts')}
forums.newtopic.tplForm to create a new topic{PHP|cot_tpl_url('forums.newtopic')}
forums.editpost.tplForm to edit a post{PHP|cot_tpl_url('forums.editpost')}
Usersusers.details.tplDetailed user profile{PHP|cot_tpl_url('users.details')}
users.edit.tplForm to edit profile{PHP|cot_tpl_url('users.edit')}
users.register.tplRegistration form{PHP|cot_tpl_url('users.register')}
users.profile.tplPublic user profile{PHP|cot_tpl_url('users.profile')}
users.passrecover.tplPassword recovery form{PHP|cot_tpl_url('users.passrecover')}
PM (Private Messages)pm.list.tplList of private messages{PHP|cot_tpl_url('pm.list')}
pm.message.tplContent of a single message{PHP|cot_tpl_url('pm.message')}
pm.send.tplForm to send a message{PHP|cot_tpl_url('pm.send')}
PFS (File Manager)pfs.tplMain file manager interface{PHP|cot_tpl_url('pfs')}
pfs.view.tplView file/folder contents{PHP|cot_tpl_url('pfs.view')}
Pollspolls.tplPoll with answer options{PHP|cot_tpl_url('polls')}
RSSrss.tplRSS feed of latest materials{PHP|cot_tpl_url('rss')}
Indexindex.tplHomepage{PHP|cot_tpl_url('index')}
Pluginsrecentitems.tplList of recently added items{PHP|cot_tpl_url('recentitems', 'plug')}
comments.tplComments with reply form{PHP|cot_tpl_url('comments', 'plug')}
comments.edit.tplForm to edit a comment{PHP|cot_tpl_url('comments.edit', 'plug')}
tags.tplTag cloud or list by tag{PHP|cot_tpl_url('tags', 'plug')}
sitemap.tplSite map{PHP|cot_tpl_url('sitemap', 'plug')}
sitemap.index.tplSite map index{PHP|cot_tpl_url('sitemap.index', 'plug')}
ratings.tplMaterial ratings{PHP|cot_tpl_url('ratings', 'plug')}
contact.tplContact form{PHP|cot_tpl_url('contact', 'plug')}
Coreheader.tplSite header{PHP|cot_tpl_url('header', 'core')}
footer.tplSite footer{PHP|cot_tpl_url('footer', 'core')}
message.tplSystem messages and errors{PHP|cot_tpl_url('message', 'core')}
Admin Panel (core, admin=true)admin.home.tplAdmin panel homepage{PHP|cot_tpl_url('admin.home', 'core', true)}
admin.main.tplMain admin panel layout{PHP|cot_tpl_url('admin.main', 'core', true)}
admin.config.tplSite configuration{PHP|cot_tpl_url('admin.config', 'core', true)}
admin.extensions.tplManage modules and plugins{PHP|cot_tpl_url('admin.extensions', 'core', true)}
admin.users.tplUser management{PHP|cot_tpl_url('admin.users', 'core', true)}
admin.structure.tplSite structure{PHP|cot_tpl_url('admin.structure', 'core', true)}
admin.extrafields.tplExtra fields configuration{PHP|cot_tpl_url('admin.extrafields', 'core', true)}
admin.cache.tplCache management{PHP|cot_tpl_url('admin.cache', 'core', true)}
admin.cache.disk.tplDisk cache details{PHP|cot_tpl_url('admin.cache.disk', 'core', true)}
admin.log.tplSystem event log{PHP|cot_tpl_url('admin.log', 'core', true)}
admin.rights.tplAccess rights{PHP|cot_tpl_url('admin.rights', 'core', true)}
admin.rightsbyitem.tplItem-specific rights{PHP|cot_tpl_url('admin.rightsbyitem', 'core', true)}
admin.other.tplOther admin settings{PHP|cot_tpl_url('admin.other', 'core', true)}
admin.phpinfo.tplPHP information{PHP|cot_tpl_url('admin.phpinfo', 'core', true)}
admin.infos.tplSystem summary{PHP|cot_tpl_url('admin.infos', 'core', true)}
Module Adminpage.admin.tplPage management{PHP|cot_tpl_url('page.admin', 'module', true)}
forums.admin.tplForum management{PHP|cot_tpl_url('forums.admin', 'module', true)}
polls.admin.tplPoll management{PHP|cot_tpl_url('polls.admin', 'module', true)}
pfs.admin.tplFile manager management{PHP|cot_tpl_url('pfs.admin', 'module', true)}
Plugin Adminrecentitems.admin.tplRecent Items configuration{PHP|cot_tpl_url('recentitems.admin', 'plug', true)}
comments.admin.tplComment moderation{PHP|cot_tpl_url('comments.admin', 'plug', true)}
tags.tools.tplTag management tools{PHP|cot_tpl_url('tags.tools', 'plug', true)}

Notes

  1. If the type is not specified, it defaults to 'module'.
  2. For plugins always specify 'plug'.
  3. For admin templates add the third parameter true.
  4. The third parameter of the cot_tpl_url($base, $type, $admin) function is $admin.

    • true — search in the admin theme (folder themes/admin/... or defined in $cfg['admintheme']).
    • false or null (default) — search in the user's regular theme; if the name contains admin, Cotonti may automatically choose the admin theme.

    Example: {PHP|cot_tpl_url('page.admin', 'module', true)} — finds the page.admin.tpl template in the admin part of the theme. Without true, Cotonti may look for it in the regular theme, which could give the wrong path.

  5. You cannot pass arrays in templates – use dot notation.
  6. If the template name is generated dynamically, pass it via $t->assign() from PHP code:

    $tpl_url = cot_tpl_url($dynamic_name, 'module');
    $t->assign('DYNAMIC_TPL_URL', $tpl_url);

    In the template: {DYNAMIC_TPL_URL}

This is not a complete set of examples for all categories and template types, but it is enough to get you started.


Conclusion

This reference covers the main Cotonti template names, grouped by category. Use it to:

  • Quickly find the template you need when editing the site's appearance;
  • Correctly call the cot_tpl_url() function in your code;
  • Understand the system's template structure and its purposes.

The summary table at the end will help you quickly find a template by category and get a ready-to-use call example. If you don't find the template you need in the list, refer to the documentation of the corresponding module or plugin.

Remember that template names may vary depending on the Cotonti version and the theme you are using. When in doubt, check the actual file names in the /themes/your_theme/ folder.



Reviews

No reviews yet


Comments (0)

No comments yet
Only registered users can post new comments

Page Discussion in Telegram

Similar pages

Extrafields Users Custom - Обзор обновления плагина
1 СодержаниеРуководство и обзор по плагину Extrafields Users Custom (xtradbrowusers)Что умеет плагин «из
User Blog • 2026-08-12 09:40 webitproff
Чистая функция (Pure Function)
2 Чистая функция (Pure Function) – это функция, которая всегда возвращает один и тот же результат при одинаковых входных
Файл functions.custom.php в Cotonti
3 В файл functions.custom.php в Cotonti обычно добавляют дополнительные пользовательские функции, которые не входят в
Руководство по пользовательским функциям functions.custom.php в Cotonti
4 Руководство по пользовательским функциям CotontiЭто руководство содержит подробное описание четырех функций,
Тип custom в переменных конфигурации
5 Тип 'custom' в переменных конфигурации Возможности типа 'custom' Новый тип custom предоставляет

Content author

webitproff

Online

Sodium Carbonate

Last logged: 2026-08-20 14:17

About me briefly
Support and development of web projects on the CMF Cotonti: private messengers via the website, open and closed small social networks, trading platforms and marketplaces, freelance and services exchange portal, catalogs of goods from wholesale suppliers, dropshipping platforms, online stores, and much more.
View developments and download
Public portfolio of my works and developments
Telegram for messages
@webitproff
Telegram channel
@s/aBuyFILE
  • Page published: 2026-08-20 12:32
  • Last update: 2026-08-20 13:36
  • Language: