2

I am trying to override the layout views of com_users in the admin side.

I have copied all view of com_users ie:

com_users/views/user/...

and copied it to the administrator template ie:

templates/isis/html/com_users/user/...

however no changes reflect on changing the template files , what am I doing wrong?

2 Answers 2

4

I think you might have got muddled up with the template.

If you're trying to override the view for the front-end of your website, you need to copy the view files to the front-end template. By default, it will be Protostar, not Isis

You have 5 different views with the com_users component:

  • Login
  • Profile
  • Registration
  • Remind
  • Reset

So if you want to override the Login view, you need to copy the PHP files from here:

components\com_users\views\login\tmpl

and your end result will be:

templates/MY_TEMPLATE/html/com_users/login/default.php
templates/MY_TEMPLATE/html/com_users/login/default_logout.php
templates/MY_TEMPLATE/html/com_users/login/default_login.php

Hope this helps

9
  • Got it , i was copying the tmpl folder too which was causing the issues ! Dec 29, 2015 at 15:16
  • Ahh yes, this can catch people out sometimes :)
    – Lodder
    Dec 29, 2015 at 15:16
  • Just one more thing , how can 'amodule' in a view file ? Dec 29, 2015 at 15:18
  • @jimmyobonyo - I'm not sure what you mean by this...could you explain please?
    – Lodder
    Dec 29, 2015 at 15:19
  • 1
    @jimmyobonyo - I'd firstly have a look at JModuleHelper::renderModule which does this. Then ask a new question if you have any issues with it ;)
    – Lodder
    Dec 29, 2015 at 15:24
5

You should not copy the full view folder, only the template files of a particular view, that you want to override.

So for example, the following file needs to be copied:

administrator/components/com_users/views/user/tmpl/edit.php

and placed in:

administrator/templates/isis/html/com_users/user/edit.php

The difference here is that you should not include the tmpl folder, inside the overrides folder.

1
  • 1
    @lodder - thanks for the edit .. I was looking at the paths and knew that I was missing something... but for some reason I was unable to realize it.
    – FFrewin
    Dec 29, 2015 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.