• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

Changing default image order

Status
Not open for further replies.

ChainKiller

💖 Chevereto Fan
I'm trying to change the default image order in albums.
I copied route.album to overrides and changed
PHP:
        $list->setSortType($list_params['sort'][0]); // date | size | views
        $list->setSortOrder($list_params['sort'][1]); // asc | desc
to
PHP:
        $list->setSortType($list_params['sort'][0]); // date | size | views
        $list->setSortOrder($list_params['sort'][0]); // asc | desc

Shouldn't that change the default order to date ascending?

But when i go to an album i get "Chevereto error: Internal Server Error".

LE: figured it out, i have to change
PHP:
$list->setSortOrder($list_params['sort'][1]);
to
PHP:
$list->setSortOrder('asc');
 
Last edited:
That $list_params['sort'] array doesn't containts "asc" or "desc", it containts the prop from the listing params, which is "desc" when you get the most recent view. You need to change the list tools "desc" to "asc", search for tabs in the same file.
 
Status
Not open for further replies.
Back
Top