1

I have created a custom filter.xml to search for specific documents. Using Joomla's category system, I have also create 3 main categories. Courtrolls, Newsletter and communique.

In my filter form, I have the following field:

<field type="category"
       category="19"
       name="roll"
       extension="com_courtroll"
       label="Select a category"
       description=""
       default="19"
/>

The problem is that I only want to have Courtrolls and its subcategories in this field, but it shows all my components categories.

1
  • Which Joomla version do you use? Joomla 3 or Joomla 4?
    – pe7er
    Commented Mar 8, 2023 at 21:55

1 Answer 1

1

You could use the SQL form field type type to get the right categories + their catids. See: https://docs.joomla.org/SQL_form_field_type

Or better: create for your component its own Fields that you load in that XML. See for example how Joomla 4 uses Fields for the com_content component: https://github.com/joomla/joomla-cms/tree/4.2-dev/administrator/components/com_content/src/Field

Your Answer

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

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