#### Steps to reproduce the issue
Because mod_articles_category is missing some functions, i needed to create a copy of it with extended features. Steps:
1) Create a new module, with the intention to display articles filtered by category-id and tags.
2) Use this to get the article-list-model:
$articles = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true));
3) Problem is: you cannot simply add a filter-state like this:
$filter_tag = $params->get('filter_tag', '');
if ($filter_tag) {
$articles->setState('filter.tag', (int)$filter_tag);
}
That is, because only the backend-model has this filter. The frontend-model does not. And i didn't found a solution in the documentations to get the instance of an admin-model.
Frontend-Model should either provide the same methodes as the backend-model, or there needs to be a possibility to get the instance of a backend-model using JModelLegacy::getInstance
or anything else, that provides a filtering-method that can be accesses using the framework and not own mysql-queries.
See description above.
Joomla 3.3.6 stable release.
\administrator\components\com_content\models\articles.php:
Admin - ContentModelArticles already uses filter_tag variables (See lines 56, 111, 297).
\components\com_content\models\articles.php -> Missing filter-functions for tags.
Priority | Urgent | ⇒ | Low |
Category | Components Documentation Front End Libraries Modules Tags | ⇒ | Front End Modules Tags |
Labels |
Added:
?
|
This is quite annoying. It's almost one year later. Any chance this will be fixed in 3.5?
As long as nobody makes a patch, it will stay here forever
I'll see what I can do. It took 10 minutes to get it working with query parameters locally. But I have to check more places before I submit a PR.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-01-05 19:07:05 |
Closed_By | ⇒ | brianteeman |
Closing as we have a PR - please test #8846
setting the prio to low, see https://docs.joomla.org/Bug_and_Issue_Tracker_Priority for more information
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5998.