ORDER of Categories in Categories View Settings

Phoca Gallery - image gallery extension
krskany
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 19 Jan 2010, 00:44

ORDER of Categories in Categories View Settings

Post by krskany »

I have got a few categories (eg. nature, culture, ...). Then some subcategories (nature/wood, culture/theatre) which are collections of photos.
A problem:
I don't know, if it's possible to set an order by date - descending independent of category names? I can set it, but the first is alphabetical order of categories, then date of category. So: categories (alpha asc), then subcategories (date desc).
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: ORDER of Categories in Categories View Settings

Post by Jan »

Hi, you can only order by name or by date, but if you want to combine it then the sql query needs to be customized. :-(

Jan
If you find Phoca extensions useful, please support the project
krskany
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 19 Jan 2010, 00:44

Re: ORDER of Categories in Categories View Settings

Post by krskany »

I want to order by DATE only. But I have got 2 levels of categories.

For example:

Category 1
- subcategory 1A (updated 1.1.2010)
- subcategory 1B (updated 4.1.2010)
Category 2
- subcategory 2A (updated 5.1.2010)
- subcategory 2B (updated 2.1.2010)
- subcategory 2C (updated 3.1.2010)

I set ORDER: DATE DESC

I expected this order:

Category 2 -> subcategory 2A (5.1.2010)
Category 1 -> subcategory 1B (4.1.2010)
Category 2 -> subcategory 2C (3.1.2010)
Category 2 -> subcategory 2B (2.1.2010)
Category 1 -> subcategory 1A (1.1.2010)

But, I got this:

Category 1 -> subcategory 1B (4.1.2010)
Category 1 -> subcategory 1A (1.1.2010)
Category 2 -> subcategory 2A (5.1.2010)
Category 2 -> subcategory 2C (3.1.2010)
Category 2 -> subcategory 2B (2.1.2010)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: ORDER of Categories in Categories View Settings

Post by Jan »

Hi, this is a problem of tree generating. So it means, you can order the categories by date, but the tree is created.

Means. Last category will be displayed and all its subcategories will be displayed
Second last category will be displayed and all its subcategires will be displayed

So there is no option to order the categories without tree creating. Such option needs to be customized in the code :-(

Jan
If you find Phoca extensions useful, please support the project
pofagyalu
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 08 Jan 2014, 13:03

Re: ORDER of Categories in Categories View Settings

Post by pofagyalu »

Dear All,

I am searching a solution to the same problem. Is there somebody who could or alread did such a customization and could help? Thanks. Zoltán
Post Reply