Skip to content

Commit

Permalink
added filter by category overlay for article-list
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes committed Apr 19, 2017
1 parent 292cbe5 commit a447dcc
Show file tree
Hide file tree
Showing 6 changed files with 246 additions and 18 deletions.
4 changes: 4 additions & 0 deletions Controller/ArticleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ public function cgetAction(Request $request)
$search->addQuery($boolQuery);
}

if (null !== ($categoryId = $request->get('categoryId'))) {
$search->addQuery(new TermQuery('excerpt.categories.id', $categoryId), BoolQuery::FILTER);
}

if (null === $search->getQueries()) {
$search->addQuery(new MatchAllQuery());
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Resources/public/dist/components/articles/list/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a447dcc

Please sign in to comment.