• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • This community is user driven. Be polite with other users.
    • We recommend purchasing a Chevereto license to participate in this community.
    • Purchase a Community Subscription to get even faster ticket response times.

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