Blog Sections Open

Sorting getResources by an Integer TV Value in Evolution CMS

How to sort getResources results by a numeric TV such as area without getting lexicographic order.

Sorting by a TV only becomes reliable once the snippet knows what type of value it is handling. If a numeric field such as area is sorted as plain text, the result order will look wrong even though the query technically works.

The original question came down to this: which parameter tells getResources to treat the TV as an integer instead of a string? That is the right question, because numeric sorting is a data-type problem, not a template problem.

This is a classic catalog issue on Evolution CMS projects. Fields like area, price, weight, rating, or stock often live in TVs, and the listing layer needs explicit numeric semantics to sort them correctly.

Whenever a TV-based sort looks “almost right but strangely shuffled”, type handling should be the first thing you inspect.

Newer post

Speeding Up AJAX Teacher Filters in Evolution CMS with Cached TV Logic

How to replace slow TV-heavy getResources filtering with a cached custom resource loop for AJAX-driven filters.

Older post

Customizing Breadcrumbs for Unpublished or Hidden Resources in Evolution CMS

How to adapt the Breadcrumbs component when unpublished or hidden resources should still affect navigation output.