In Diem CMS I would like to do a conditional statement that would exclude some articles based on the tag model
Diem documentation gives the following for conditional queries (http://diem-project.org/diem-5-1/doc/en/reference-book/list-widgets)
$query = $this->getListQuery('post')
->addWhere('post.name LIKE ?', '%symfony%');
Is there a way to exclude some post according to the tags it has?
Here is my new query which seems better (to me at least) but it is still not working.
public function executeList()
{
$query = $this->getListQuery();
$query->leftJoin('DmTag');
$query->addWhere('DmTag.name NOT LIKE ?', '%Fichets%');
$this->articlePager = $this->getPager($query);
$this->articlePager->setOption('ajax', true);
}
The Diem blog is done according to the Diem tutorial and I use the standard (out of the box so to say) Diem Tag plugin. I did not modify the model nor the name of the Table.
This is the working query: