Return to Customization
We can create a custom “template pack” as part of your Association Engine installation. The template pack includes template overrides necessary to achieve layout and functionality that differs from AE baseline. It also includes a template configuration file. All of these files are installed in your WordPress plugins. While the template pack can be modified, making changes to any of the files can have unintended consequences throughout the site. Do not modify the code without consulting your project manager.
Important: Template packs have changed! We recently added a demo template pack which you can clone and rename to create your own custom template pack. You must be using Association Engine revision 2.7 or later to use the new demo template pack. Please ask your project manager for details.
Anatomy of a Template Pack (the new way)
We changed how template packs are handled in Association Engine 2.5. Please use this reference if you are using that version or later.
The template pack consists of the following files, in the wp-content/plugins/ directory (replace “clientname” with an abbreviation of your organization’s name):
- ae_extension-clientname.php – Specifies which plugins to use and which additional classes exist. It also enqueues any necessary CSS and JS files. If you have some custom settings that you wish to add for the template pack, you will also set up the foundation for that here, but the actual custom settings will be in another file.
- class.settings.php – This file allows you to add custom settings for your template pack. We added this so you can make a single template pack for use on multiple sites that might need some elements customized. For example, you can add a redirect link that might need to change on each site, or an image.
- css/ – Add any CSS overrides that you might need in here. Make sure you also enqueue the file(s) in plugin-templates-clientname.php.
- images/ – Place any images that you might need in the template pack in this directory.
- views/ This is where you will add your view overrides. Just copy the template that you would like to override from any of Association Engine views directories.
Anatomy of the Template Pack (the old way)
This is how we used to handle template packs. This has changed. If you are using a newer version of AE (2.5+) please do not use this.
The template pack consists of the following files, in the root directory of the AE plugin (replace “clientname” with an abbreviation of your organization’s name):
- plugin-templates_clientname.php – Specifies which plugins to use, and which additional classes exist. This file also might contain additional configuration.
- Template Pack Class files – There may be one or more of these files, containing “class” in the filename. They contain code that provides the logic and/or functionality for custom(ized) modules included in your AE installation.
- templates_clientname/css/ – Contains CSS overrides
- templates_clientname/js/ – Contains JS overrides and
- templates_clientname/views/ – Contains “view” overrides
Making Changes to the Template Pack
While the template pack can be modified, making changes to any of the files can have unintended consequences throughout the site. Please do not modify the code without first consulting your project manager. If you do add views, or other files, to your template pack, or change any of the files, please let us know so we don’t accidentally overwrite your changes when we push updates. This is less of an issue if you are in AE 2.5 or later, because the template pack is no longer in the main plugin directory. Please be aware that we typically do not maintain your customizations in our copy of the code, and customizations are not covered by any warranty.