In versions up to 3.10.2, all weblinks are listed in a category by id ordering. That is the order as shown in the "ordering" administrator view. I would like them listed by default in alphabetical title order. There does not seem to be any option for this sort order. So I have implemented the following code change.
To change the default, I have modified the code as follows. Note that this change will be replaced with any update. The proper approach would be to create a new component with this change. Instead I'll stay vigilant after updates and wait to see an alternative solution implemented.
In the file: components/com_weblinks/models/category.php
Find the code near line 235 that reads as follows:
// Optional filter text
$this->setState('list.filter', $app->input->getString('filter-search'));
$orderCol = $app->input->get('filter_order', 'ordering');
if (!in_array($orderCol, $this->filter_fields))
{
$orderCol = 'ordering';
}
$this->setState('list.ordering', $orderCol);
Change to read as follows:
// Optional filter text
$this->setState('list.filter', $app->input->getString('filter-search'));
$orderCol = $app->input->get('filter_order', 'title');
if (!in_array($orderCol, $this->filter_fields))
{
$orderCol = 'ordering';
}
$this->setState('list.ordering', $orderCol);