We remove unnecessary items from the {sort} tag, customize it for ourselves.




We customize the news sorting items on the main page for ourselves.
The {sort} tag is responsible for displaying the user's choice of the news sorting order.
How do I delete unnecessary items in the news sorting tag?

1. Open the file engine/modules/functions.php and we are looking for the string:
function news_sort($do)
Under this line are all the items from the {sort} tag We find unnecessary ones and delete them.
For example, we will remove the news sorting item by popularity (rating). To do this, delete the line:
'rating' => array (
    'name' => $lang['sort_by_rating'], 'value' => "rating", 'direction' => "desc", 'image' => "" ),
etc..

2. Configure the name of the items in the file language/russian/website.lng
'sort_main'          => "Sort articles by:",
'sort_by_date'       => "date",
'sort_by_rating'     => "popularity",
'sort_by_read'       => "attendance",
'sort_by_title' => "alphabet",
'sort_by_comm' => "comments",

Go back
26-12-2022, 14:33