Customizing Admin templates

We need your assistance to make the documentation accurate, user friendly and understandable. Therefore we welcome any tips or suggestions regarding documentation. Thank you in advance for your contribution.

However, we will not respond to technical support questions submitted using this form. If you are having difficulty with CMSMS and cannot find the solution on this website, please submit your question appropriately on our support forum at: http://forum.cmsmadesimple.org. Please remember to follow the forum rules when posting.

CMS Made Simple™ Partner



From time to time you need to change an admin form. Perhaps you need to remove some of the optional fields so that end users don't get confused. And because CMSMS is an open source package, and is written in PHP you can go ahead, find the right file(s) and edit them.

However, this has challenges. The next time that a new version of that particular module is released you will have to re-do all of these changes because the upgrade will replace your modified files.

Fortunately, for minor things like tweaking admin templates CMSMS handles this nicely.

Let us say you're using the CompanyDirectory module as more like a member database, and you want to remove a few fields that you won't need, like fax etc.

So you want to remove the fax field from the CompanyDirectory add/edit company forms. This is simple enough to do:

  • Create a new directory called templates underneath assets/module_custom/CompanyDirectory.
  • Find the appropriate .tpl file in modules/CompanyDirectory/templates
  • Copy that template to assets/module_custom/CompanyDirectory/templates
  • Edit the new file to remove the fax field.
    You will notice in the editcompany.tpl file some text that looks like below. Simply remove this text.
<div class="pageoverflow">
<p class="pagetext">{$faxtext}</p>
<p class="pageinput">{$inputfax}</p>
</div>

Now when you add a new company in the CompanyDirectory module the fax field will no longer be present.

These simple steps can be used over and over again, just edit more things in the template, to customize the appearance of any module. And when you upgrade to a newer version of the module, your changes will be intact.