Last Updated: February 25, 2016
·
507
· anriettec

Override Joomla! core layouts in your custom component (J! 3.4.x)

Overriding core Joomla! layouts for things like output of fields created using JForm() is easy and straightforward.

Just locate the file you want to override and recreate its folder path from

~/layouts/...

to

~/components/com_yourcomponent/layouts/...

I used JForm() to create a custom form using an XML manifest located inside my component, but I didn't like the standard way of outputting and wanted to incorporate Bootstrap markup into my component. So I just copied renderField.php to this path:

~/components/com_mycomponent/layouts/joomla/form/

It kicked in right away.