Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1491

Joomla! 5.x Coding • Re: Filter by categories and category title in the list of items

$
0
0
You need to include the possible filters in your config array built in the __construct method.

So your published filter needs the entry 'published' added to that array.
Yes, right. But I have filters in this array. Do you meant this? Or something else?

Code:

public function __construct($config = []){// Добавляем валидные поля для фильтров и сортировки.if (empty($config['filter_fields'])) {$config['filter_fields'] = array(            'id', 'a.id',            'name', 'a.name','catid', 'a.catid', 'category_title','alias', 'a.alias','country', 'a.country','city', 'a.city','sex', 'a.sex','availability', 'a.availability',            'ordering', 'a.ordering',            'state', 'a.state',            'created', 'a.created',            'modified', 'a.modified'        );}parent::__construct($config);}

Statistics: Posted by zeus07 — Tue Apr 30, 2024 2:32 pm



Viewing all articles
Browse latest Browse all 1491

Trending Articles