Logic part of category display