Added twig template, templates and search functionality.

This commit is contained in:
Krzysztof Płaczek
2024-03-28 16:07:19 +01:00
parent 5d0a44946f
commit d2abfba355
6 changed files with 261 additions and 65 deletions

View File

@@ -0,0 +1,22 @@
{% extends "template.html.twig" %}
{% block content %}
<table class='table table-hover'>
{% for product in products %}
<tr>
<td><img src='{{ product.image }}&width=70' class='img-fluid' alt='{{ product.name }}'/></td>
<td><a href='?product_id={{ product.id }}'>{{ product.name }}</a></td>
<td>{{ product.subTitle }}</td>
<td>
<ul class='nav'>
{% for category in product.categories %}
<li class="nav-item"><a class="nav-link" href="?category={{ category }}"> {{ category }} </a></li>
{% endfor %}
</ul>
</td>
<td><a href='https://pl.ryobitools.eu/{{ product.url }}'>link</a></td>
<td>{{ product.price.last.price }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}