I'm working with latest Joomla 4 beta, and wondering how can I use namespaces with templates so I can start using and developing custom fields for my templates.

I need to know what should I set in the templateDetails.xml file so I can use proper addfieldprefix address for my custom fields.

Some context:

  • what I have and currently use is based on my previous questions asked here: plugin defined custom field - partially works with addfieldpath for templates, use plugin defined custom field inside another plugin, setting extension namespace
  • no matter how/what, using addfieldprefix inside the templateDetails.xml and linking from a plugin doesn't work; EG addfieldprefix="Joomla\CMS\Plugin\EditorsXtd\Vimeo\Field"
  • I also found no documentation, stackoverflow or any resource about using namespaced custom form fields inside templateDetails.xml, I only found the libraries/namespacemap.php and seems only 4 types of items can use this system: if (!in_array($type, ['component', 'module', 'plugin', 'library'], true))

Open to any suggestion.


  • For those interested, probably mostly @Sharky, I made a PR to Joomla git in regards to this.
    – thednp
    Commented Sep 30, 2020 at 12:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.