Page 1 of 1

How sort backend categories dropdown

Posted: 16 May 2018, 11:58
by Veritas
Hello
in the Phoca Download backend I would need to sort alphabetically the dropdown of the categories because when I insert new categories these are in order of insertion.
Do I have to act on the code? Which file should I modify?
I attach a picture to make you understand what I need.

https://ibb.co/bUsTqd

Thank you and sorry for my bad English.

Marco

Re: How sort backend categories dropdown

Posted: 17 May 2018, 00:28
by Jan
Hi, see:
administrator\components\com_phocadownload\models\fields\phocadownloadcategory.php

This field displays select box with list of categories.

Jan

Re: How sort backend categories dropdown

Posted: 17 May 2018, 15:28
by Veritas
//build the list of categories
$query = 'SELECT a.title AS text, a.id AS value, a.parent_id as parentid'
. ' FROM #__phocadownload_categories AS a'
. ' WHERE a.published = 1'
. ' ORDER BY a.title';
//. ' ORDER BY a.ordering';

Problem solved, thanks Jan.

Re: How sort backend categories dropdown

Posted: 18 May 2018, 22:58
by Jan
Ok, great to hear it.

Jan