? Success

User tests: Successful: Unsuccessful:

avatar nvyush
nvyush
3 Oct 2016

Pull Request for Issue # .

Summary of Changes

This improvement adds ability to get extension for categories from another field by filling attribute 'extension' of the categories field with the name of the extension type field in format 'field:fields_group_name.field_name', i.e.:

<fields name="params">
    <fieldset name="basic">
        <field
            name="extension_type"
            type="list"
            label="CATEGORIES_EXTENSION_TYPE_LABEL"
            description="CATEGORIES_EXTENSION_TYPE_DESC"
            default="com_content"
            required="true"
        >
            <option value="com_content">CONTENT_CATEGORIES</option>
            <option value="com_contact">CONTACT_CATEGORIES</option>
        </field>
        <field
            name="categories"
            type="category"
            label="CATEGORIES_LABEL"
            description="CATEGORIES_DESC"
            extension="field:params.extension_type"
            default=""
            multiple="true"
        />
    </fieldset>
</fields>

This improvement is backward compatible.

Testing Instructions

  1. Make backup of the /modules/mod_breadcrumbs/mod_breadcrumbs.xml file.
  2. Replace the /modules/mod_breadcrumbs/mod_breadcrumbs.xml file with this file (removing '.txt')
    mod_breadcrumbs.xml.txt

In the administrator panel:

  1. Create some test content categories.
  2. Create some test contact categories.
  3. Create module of type 'breadcrumbs'.
  4. Check the lists of categories for the categories fields. There must be:
    Standard content categories - content categories
    Modal content categories - content categories
    Standard selectable categories - contact categories
    Modal selectable categories - contact categories
  5. Change the value of the 'Extension type' field to 'Content categories' and save the module.
  6. Check the lists of categories for the categories fields. There must be:
    Standard content categories - content categories
    Modal content categories - content categories
    Standard selectable categories - content categories
    Modal selectable categories - content categories

P.S. You can use any module for testing instead of mod_breadcrumbs. The main is to add the fields for selecting component type and for selecting categories to its xml-file as in the given file mod_breadcrumbs.xml.txt.

Documentation Changes Required

There need to add the description of this feature to the article 'Category form field type' (https://docs.joomla.org/Category_form_field_type):
extension (mandatory) is the name of the extension for which the categories will be retrieved or the reference to the field for selecting extension. For example, to list content categories, use the value 'com_content', to get extension from the value of the field 'extension_type' of the field group 'params' use 'field:params.extension_type'.

avatar nvyush nvyush - open - 3 Oct 2016
avatar nvyush nvyush - change - 3 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Oct 2016
Category Administration Components Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 3 Oct 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 4 Oct 2016

Maybe its just a problem with your description but I am struggling to see the benefit of this

avatar nvyush
nvyush - comment - 4 Oct 2016

The benefit is simple. One can develop some uneversal module to display any type of categories and use parameters for selecting the component type and for selecting categories of the selected type.

avatar nvyush nvyush - edited - 4 Oct 2016
avatar nvyush nvyush - change - 4 Oct 2016
The description was changed
avatar nvyush nvyush - edited - 4 Oct 2016
avatar brianteeman
brianteeman - comment - 9 Oct 2016

Sorry I still dont get it


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12286.

avatar rdeutz rdeutz - change - 27 May 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - change - 27 May 2017
Category Administration Components Libraries Administration com_categories Libraries Components
avatar brianteeman
brianteeman - comment - 9 Sep 2017

Closed due to lack of interest

avatar brianteeman brianteeman - change - 9 Sep 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-09-09 13:38:15
Closed_By brianteeman
avatar brianteeman brianteeman - close - 9 Sep 2017

Add a Comment

Login with GitHub to post a comment