How to override the component mvc from the Joomla! core

From Joomla! Documentation

Other languages:
English • ‎español • ‎français • ‎русский


This method only works if you install and enable the 3rd party MVC plugin joomla-override found on github - or provide your own equivalent plugin. It is fine for advanced developers - just be aware that this is not part of Joomla! Core code

There is currently no plugin available that can help you. So you will need to write your own plug-in which is not trivial. This documentation should probably be removed.


There may be times when you need to override the Joomla! MVC Component to add new functionality or to completely customise the component. The MVC component can be completely overridden by using the same class names that are used in the component. This is achieved by loading a system plugin before the component is dispatched by the application.

You can create your own plugin to do this.

class plgSystemComContentOverride extends JPlugin {
      public function __construct(&$subject, $config = array()) {
         parent::__construct($subject, $config);

     public function onAfterRoute() {
         $app = JFactory::getApplication();
         if('com_content' == JRequest::getCMD('option') && !$app->isAdmin()) {
             require_once(dirname(__FILE__) . '/comcontentoverride/my_content_controller.php');

In the examples below we are using an Override MVC plugin (At least by 2016-08-04 unpublished at JED and not available)

Another alternative is a modern plugin MVC Override which uses similar (but a little changed) logic and is much improved. MVC Override implements this tutorial approach but has wider possibilities. (At least by 2016-08-04 it's not listed at JED)

Getting a head-start with overrides

You can override by templating or by application scope (frontend/backend).

Using a templating method

Override Base Component Controller


Override Another Component Controller


Override Models


Override Views


Using application scope method

You can override by creating a code folder in the base path from application.

Note: this method is experimental. Please read this!searchin/joomla-dev-cms/override/joomla-dev-cms/_vVxbHsXm20/JdsBRP8xrPAJ and this first

Site General Override


Override Another Component Controller


Override Models


Override Views


Administrator General Override


Override Another Component Controller


Override Models


Override Views


Extending Default Class

if you ENABLE the override class functionality you can extend original classes and override your custom methods.

See this example with banner controller:

file: administrator/code/com_banners/controller.php

 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license             GNU General Public License version 2 or later; see LICENSE.txt
// No direct access
defined('_JEXEC') or die;
 * Banners master display controller.
 * @package             Joomla.Administrator
 * @subpackage  com_banners
 * @since               1.6
class BannersController extends BannersControllerDefault
//your custom methods here