Render category tree on category pages
This commit was merged in pull request #56.
This commit is contained in:
@@ -11,9 +11,9 @@ final class CategoryController extends BaseController
|
||||
#[Route('/category/{category}', name: 'app_category')]
|
||||
public function __invoke(string $category): Response
|
||||
{
|
||||
// if($this->cache->getItem('list_category_'.$category)->isHit()) {
|
||||
// return $this->render('productList.html.twig', ['listType' => 'category_'.$category]);
|
||||
// }
|
||||
if($this->cache->getItem('list_category_'.$category)->isHit()) {
|
||||
return $this->render('productList.html.twig', ['listType' => 'category_'.$category]);
|
||||
}
|
||||
|
||||
/** @var Product[] $products */
|
||||
$products = Product::with(['price', 'lowestPrice'])
|
||||
|
||||
Reference in New Issue
Block a user