Hello Super Joomlers!

I know, I know. Multi what?  What is that entangled weird title? Fear not! Delicious meal is coming. Everything going be crystal clear soon. Bear with me. Since Joomla! 3.7 custom fields was merged into Joomla! core. Custom fields was originally a work from Allon Moritz (@laoneo). He decided to gave it to Joomla! community. Big thanks to him and all the Joomla! team and contributors. What you need to know is that core components like com_content (articles) support custom fields out-of-the-box. But how about third-party extensions that we as developers want to make? We want custom fields too for our extensions even more.

This example component com_example showcase how to integrate basic custom fields support and more advanced stuff like multi-context support (think of this like multiple elements that can have theirs own custom fields and groups of custom fields). Eg: A hotel that wants to manage their customers activities during the 4 seasons of the year.

"context 1" : Spring
  Custom field group: "Spring activities"

  • Custom field: Swimming

"context 2" : Summer

Custom field group: "Summer activities"

  • Custom field: Volley Ball

etc...

With multi-context custom fields, each seach is listed in a dropdown list in the custom fields filter and in custom fields group filter in Joomla! backend.

Voici le code source du composant d'exemple com_example

That's it for today. Take care Super Joomlers!