Search…

X3 Photo Gallery Support Forums

Search…
 
RBachmann
Experienced
Topic Author
Posts: 42
Joined: 20 Jun 2012, 17:15

Sort galleries by date desc.

17 Nov 2014, 09:58

I cannot emphasize enough how much I love the new X3 gallery and how easy and intuitively it can be installed and configured.

One question came up though:
Is it possible to change the order of galleries within a folder to display the newest gallery at top of the listing?

The corresponding use-case is: I have new pictures and I would like to have them displayed as the first element in the gallery overview. I could always change the numbering in front of the title (1.Trip-to-Paris, 2.Trip-to-London, ...) by increasing the number of all previous galleries by one but I don't think it's feasible for more than 10 galleries in a folder.

What I tried:
Set the date tag of all galleries to date like "2014-09-02", "2014-09-06", ... and set the folders tag of the parent-folder to "sort:date sort:desc" or "sort:date,desc" but this doesn't work obviously.

Is it already possible to do it and am I simply not getting the right syntax or isn't it possible yet and would directly find a place in the requested-features-list? :-)

Thank you and best regards
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Sort galleries by date desc.

17 Nov 2014, 10:05

Sorting is high-priority, and we will be offering more options for this as soon as we find the time. You should already be able to invert the sorting, by adding this to your pages folder setting:
Code
folder: sort:desc
You could also add it globally in main settings under "Include page settings":
Code
include:
  folders: sort:desc
 
RBachmann
Experienced
Topic Author
Posts: 42
Joined: 20 Jun 2012, 17:15

Re: Sort galleries by date desc.

17 Nov 2014, 10:11

Hi Karl

Thank you for the quick reply. Yes, sorting like that works but it sorts the galleries just in reverse order of the id (the number in front of the title). For now this works, so I just have to add the galleries in chronological order.

I can perfectly live with this until an advanced sorting mechanism is available and it is far away from top-priority :-)

Thank you again for your hard work, I really appreciate it. I've got two more small questions but I'm going to ask them in different threads in this forums.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Sort galleries by date desc.

17 Nov 2014, 10:14

Yep ok, you basically want sort-by-date ordering mechanism right? Should be quite high-priority.
 
RBachmann
Experienced
Topic Author
Posts: 42
Joined: 20 Jun 2012, 17:15

Re: Sort galleries by date desc.

17 Nov 2014, 10:17

Yes, exactly.

Therefore I already prepared the galleries by using the "date" option. I used the date-format "YYYY-MM-DD". It is not explicitely stated in the docs that this works but I assume it does since you wrote "You can write dates in any recognizable format..."
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Sort galleries by date desc.

17 Nov 2014, 11:15

RBachmann wrote:Therefore I already prepared the galleries by using the "date" option. I used the date-format "YYYY-MM-DD". It is not explicitely stated in the docs that this works but I assume it does since you wrote "You can write dates in any recognizable format..."
Just to be clear ... You are adding that date-format to the date setting for each page right? Currently, that is not used for sorting, but it certainly should be, so we will look into "sorting" pretty soon.

In the meantime, you can sort your folder with basic "numbering" of course, like "1.firstfolder" and "2.secondfolder", but you can also wait if this is tedious for you. The number before the folder name will not actually display in the URL.
 
RBachmann
Experienced
Topic Author
Posts: 42
Joined: 20 Jun 2012, 17:15

Re: Sort galleries by date desc.

17 Nov 2014, 12:33

mjau-mjau wrote:Just to be clear ... You are adding that date-format to the date setting for each page right?
Yes, exactly.