Is it possible to create two category fields in the same table with different menu categories to each of them to add new category #40767
Unanswered
madanedeepali
asked this question in
General
Replies: 1 comment 2 replies
-
It's possible to have multi-categories for your own extensions since always. The important part is, what you do on saving (and reading) the values. Two ideas (there are more):
I use the seccond approach in my own extension (but using checkboxes to select the categories instead of an dropdown). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to implement Multi-categories for other components in Joomla 4 now in 2023?
For example, in my table #__shopping_details I want to add two category fields so I added
<field name="shopping_account" extension="com_shopping.shoppingdetails" type="category" label="COM_SHOPPING_FORM_LBL_SHOPPINGDETAIL_SHO_CAT" description="COM_SHOPPING_FORM_DESC_SHOPPINGDETAIL_SHO_CAT" hint="COM_SHOPPING_FORM_LBL_SHOPPINGDETAIL_SHO_CAT"/>
<field name="shopping_item_category" extension="com_shopping.shoppingdetails" type="category" label="COM_SHOPPING_FORM_LBL_SHOPPINGDETAIL_SHOOPING_ITEM" description="COM_SHOPPING_FORM_DESC_SHOPPINGDETAIL_SHOOPING_ITEM" hint="COM_SHOPPING_FORM_LBL_SHOPPINGDETAIL_SHOOPING_ITEM"/>
But it will allow me to add categories field twice which could be achieved using multiple true instead of adding two category fields which I do not want what I want is to allow adding two category fields with different categories in it respectively so the same table will have two different categories menu to add categories in it, for example, shopping_account and shopping_item_category and will have different menus to add categories in it...is it achievable in Joomla using Category field? can someone guide me on the same?
Do I need to change extension="com_shopping.shoppingdetails" and extension="com_shopping.shoppingdetails" to something else?
@pollen8 @elkuku @dziudek
Beta Was this translation helpful? Give feedback.
All reactions