Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Show gallery by filename in descending order

  • Luke Douglas
  • Luke Douglas's Avatar Topic Author
  • Offline
  • Junior Member
More
6 years 10 months ago - 6 years 10 months ago #166407 by Luke Douglas
Show gallery by filename in descending order was created by Luke Douglas
I have images that use years such as '1996-1997', '1997-1998, '1998-1999'. etc. which I desperately need to arrange in descending order so the most recent is shown first. Is there any way to accomplish this without having to put some type of number as the order at the very beginning of the filename, ie: 100--2017-2018-blah-blah.jpg, 110--2016-2017-blah-blah.jpg, 120--2015-2016-blah-blah.jpg etc. OR change the order for ALL galleries which really isn't a solution. :(
Last edit: 6 years 10 months ago by Luke Douglas.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 10 months ago #166421 by Krikor Boghossian
Replied by Krikor Boghossian on topic Show gallery by filename in descending order
Hello Luke,

Unfortunately the ordering setting is a global setting.
With some PHP coding you can resort the images array on a per-template case.
php.net/manual/en/function.sort.php

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Luke Douglas
  • Luke Douglas's Avatar Topic Author
  • Offline
  • Junior Member
More
6 years 10 months ago #166426 by Luke Douglas
Replied by Luke Douglas on topic Show gallery by filename in descending order
Krikor,

I know this subject has come up several times over the years. Why not just change the sequence of the array and have the setting as part of the {gallery} parameters? You probably have one of the best pro versions of gallery displays as there are as I have used several but, pretty much, standardized on SIG Pro over four years ago. This is really the only 'real' feature that should be a part of the gallery and not leave it up for individual developers to have to create alternative templates just to do something it should already be doing.

Just my two cents. :(

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 10 months ago #166460 by Krikor Boghossian
Replied by Krikor Boghossian on topic Show gallery by filename in descending order
That is a nice and valid suggestion.
I 'll propose it for the upcoming version :)

Thanks!!!

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum