If we have some list of items in category view of some component (no matter what component — interesting in general solution) how can we loop only the items with some condition that is given from some custom plugin but WITHOUT editing core files of the component or template overriding? For example we display the item titles of com_content through:
foreach ($this->items as $article)
{
echo $article->title;
}
How can we "put" (not putting in com_content but programmatically on the fly) some condition from plg_myplugin to display only the items with this condition for example:
foreach ($this->items as $article)
{
if($article->some_parameter == 'some value')
{
echo $article->title;
}
}
In other words how to create own plugin-filter for sorting the items of component?