You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Case:
There's a nodetype "project" which has a property "categories" of type references. On the category page, i want to list all projects which have the current category in their reference property.
Eel:
This works when there's only one category attached, if a 'project' has more than one category it will be not listed. Is there any possibility to check if the node is in the references list? Something like:
I solved my problem by extending \Flowpack\SimpleSearch\ContentRepositoryAdaptor\Search\SqLiteQueryBuilder and adding the following function:
/** * adds an like query for references. * * @param $propertyName * @param $propertyValue * @return QueryBuilder */publicfunctionisInReferences($propertyName, $propertyValue) {
$this->where[] = "(" . $propertyName . " LIKE '%" . $propertyValue->getIdentifier() . "%')";
return$this;
}
Duske
changed the title
ExactMatch operator does not seem to work with properties containing multiple items
ExactMatch operator does not seem to work with properties containing multiple references
Dec 9, 2014
Use Case:
There's a nodetype "project" which has a property "categories" of type references. On the category page, i want to list all projects which have the current category in their reference property.
Eel:
This works when there's only one category attached, if a 'project' has more than one category it will be not listed. Is there any possibility to check if the node is in the references list? Something like:
The text was updated successfully, but these errors were encountered: