Obaid Maroof
Obaid Maroof

Reputation: 1579

backend controller override joomla 2.5

A quick questions: Is there any possibility to override one of the backend controllers in Joomla 2.5??? Lets say I want to override the backend article controller of the com_content component.

scenario...

in addition to normal article attributes, I want to store some additional attributes coresponding to every article. These attributes would be stored in another table as I have 1 to many relationship between article and new_attributes. For this purpose, I added new fields in the metadata group of article properties by writing my custom plugin. Now I want these newly added fields to be stored in a separate table with current article id associated to each entry of this new_attribute.

Hope it enough to define the scenario.

Upvotes: 1

Views: 925

Answers (4)

G3z
G3z

Reputation: 656

I recently had to fight with this. You could write a simple plugin as it's explained here (basically using JLoader::register() to load your class).

BUT as the article says:

This technique can be used to override most Joomla core classes, except for those that are already loaded before the system plugins are imported.

If you class is still not loaded i suggest you pay a visit to my pull request on github and

change libraries/loader.php on line 150 with

self::register(strtolower($class), $base . '/' . $path . '.php',false);

Then, if you found that helpfull, upvote that pullrequest so that my hack becomes standard Joomla and we are free to override what we need

Upvotes: 1

George Wilson
George Wilson

Reputation: 5705

Core Hack You can certainly do it. But you would find that after every update of Joomla your changes would be overwritten.

Override http://extensions.joomla.org/extensions/style-a-design/templating/15611 << This plugin here allows 'overriding' of the Joomla core. However be careful as it is 3rd party! Joomla don't have anything natively to support this yet. But note it is an option for someone to work on for the google summer of code 2013

Upvotes: 1

Obaid Maroof
Obaid Maroof

Reputation: 1579

After doing some search over the internet, I got to reach the following article:

http://docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core

This seems to do the trick...

Upvotes: 0

Valentin Despa
Valentin Despa

Reputation: 42582

You are very vague about what you want to do, so our answers will also be very general. First of all really check or explain if you need to override an controller (it's quite unusual).

How about creating a new controller - view in com_content?

Upvotes: 1

Related Questions