1. Home
  2. Docs
  3. Simpods MVC
  4. Tutorials
  5. Files Designed To Be Overwritten

Files Designed To Be Overwritten

In general while almost all files can be overwritten by a child theme, only views and frontend controllers are intended to be, most models and other files are not. Further details and exceptions are provided below.

Models

The included models provide functionality for most of the features of Simpods MVC and therefore should not normally be overwritten. New functionality should normally be created in one or more new models. The following are exceptions that are intended to be overwritten

Frontend

  • MVC_Front_Factory (/mvc/models/mvc-front-factory.class.php) – This class is intended to hold static variables, methods and constants for use anywhere within the frontend system.
  • MVC_Front_Cross_Site (/mvc/models/mvc-front-cross-site.class.php) – This model is intended to hold commonly used frontend methods that do not fit into a specific model.

Admin

  • MVC_Admin_Factory (/mvc/admin/models/mvc-admin-factory.class.php) – This class is intended to hold static variables, methods and constants for use anywhere within the admin system.
  • MVC_Admin_Cross_Admin(/mvc/admin/models/mvc-admin-cross-admin.class.php) – This model is intended to hold commonly used admin methods that do not fit into a specific model.

Views (templates)

The included templates are all simple examples and are all designed to be freely overwritten.

Controllers

As controllers are tightly coupled to a view their suitability for overwriting depends on that file

Frontend

As frontend views can be overwritten, all frontend controllers can be with the following exception.

  • Ctrl_MVC_Front_Controller (/mvc/control/ctrl-mvc-front-controller.class.php) – This is the parent class for frontend controllers, new functionally should be included in a page controller or Cross_Sites_Ctrl

Admin

As admin views are mostly contained within an admin model, admin controllers are not intended to be overwritten with the following exception.

  • Ctrl_MVC_Admin_Cross_Admin (/mvc/admin/control/ctrl-mvc-admin-cross-admin.class.php) – This is the additional controller loaded alongside the controller for the current page, functionality used across many admin pages should be included here.

Ajax handlers

The included Ajax handling classes are all non-functional examples that can be freely overwritten.

Other Files

Template parts (inc. header, footer, etc.)

As with views these are simple examples designed to be freely overwritten.

Global classes (simpods-*.class.php)

The included global classes provide important functionality for Simpods MVC and therefore should not normally be overwritten. New functionality should be created within a new class.
custom-global.class.php can be overwritten.

Other files in /mvc/

These files provide functionality required for loading the rest of Simpods MVC and therefore should not normally be overwritten with the following exception.

  • AJax (ajax-cross-site.php) – This class is intended to hold Ajax handlers used in both the frontend and admin.