PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar charvimehradu
charvimehradu
8 Aug 2023

Pull Request for Issue #39532 .

Summary of Changes

  1. Create a field to set the ordering of the categories in the backend.
  2. Add the functionality to order the categories according to the order by query in the database: To determine the ordering for the database query, include the getCategoryOrdering method. The desired category ordering preference is fetched in the getChildrenCategories method, a SQL query is built based on this preference, and the resulting order is used to sort and restructuring the array of child categories. The resulting array $orderedChildrenCategories will contain the children categories sorted as per the Joomla database query order.

Testing Instructions

  • Create different categories and assign them a parent category. (Menu -> Content-> Categories -> New)
  • Move to site modules and add Articles Categories Module (New -> Articles Categories +). Select Parent Category and find the option for Category Ordering just below it and set according to your choice.

image

  • Save the module.

Actual result BEFORE applying this Pull Request

No option to order the categories.

Expected result AFTER applying this Pull Request

You are able to order the categories according to their title and lft values.

f2edf16a-d6ef-4c2b-bd75-0439a652ed42.mov

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed
avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2023
Category Modules Front End
avatar charvimehradu charvimehradu - open - 8 Aug 2023
avatar charvimehradu charvimehradu - change - 8 Aug 2023
Status New Pending
avatar charvimehradu charvimehradu - change - 8 Aug 2023
The description was changed
avatar charvimehradu charvimehradu - edited - 8 Aug 2023
avatar charvimehradu charvimehradu - change - 8 Aug 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-08-08 11:01:02
Closed_By charvimehradu
Labels Added: PR-4.4-dev
avatar charvimehradu charvimehradu - close - 8 Aug 2023

Add a Comment

Login with GitHub to post a comment