0

I understand the ability to overide core views in Joomla using overides, but how about the models and controllers? I would like the ability to add a field to the core user registration form, but Joomla pulls all the fields from an xml located in the models folder. I could just create a plugin, but that creates its own section, and I need it to go exclusively in the main registration form, as I am creating a tiered registration.

My question is exactly how the title implies, can you create component overrides of model and controller files in joomla, rather than just views?

Further, I know I "could", but in the event of an update I want to make sure this is an acceptable override solution - not just a hack that will be subject to be overwritten.

Thanks!!

segarci
  • 739
  • 1
  • 11
  • 19
cclark413
  • 425
  • 3
  • 13
  • First, the plugin fields being in their own section of the page is just a convenience since the default layout just loops through the unknown fields. Since you know the fields there is no reason that you have to do that looping, you should use a specific layout naming the individual fields you want. But yes you can override naything in Joomla, there is some documentation about this in the wiki but in your case I think it is unnecessary to go that way. A form plugin can modify that form also. http://docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core – Elin Apr 14 '14 at 12:35

1 Answers1

0

Yes it can, i used MVC Override 1.0.11, is Joomla 3.x compatible.

in my case i used to override /models from component com_tag

structure in your template in this form: /code/YOUR_COMPONENT/models/tag.php

above is my example

and you can do override correctly. the link is: http://gruz.org.ua/en/extensions/joomla-mvc-override/1_0_11.html

rsurjano
  • 58
  • 2
  • 8
  • This plugin raised errors. Fatal error: Call to a member function setup() on a non-object in D:\xampp\htdocs\my_project\libraries\gjfields\variablefield.php on line 222 – cha Nov 28 '14 at 05:13