Start working on sorting products by different columns.
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
{% extends "template.html.twig" %}
|
||||
|
||||
{% block content %}
|
||||
{{ app.request.get('order') }}
|
||||
<table class='table table-hover'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th><a href="{{ path( app.request.get('_route') , {'order': app.request.get('order') is same as('-name')?'name':'-name'|default('-name')}) }}">Name</a></th>
|
||||
<th>Categories</th>
|
||||
<th></th>
|
||||
<th>Price</th>
|
||||
<th><a href="{{ path( app.request.get('_route') , {'order': app.request.get('order') is same as('-price')?'price':'-price'|default('-price')}) }}">Price</a></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Reference in New Issue
Block a user