Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add categories in base html

Michal Ociepka067a4556d2b0
diff --git a/product/templates/product/index.html b/product/templates/category/index.html
similarity index 61%
rename from product/templates/product/index.html
rename to product/templates/category/index.html
index c1e1233a66..5af2c20d61 100644
--- a/product/templates/product/index.html
+++ b/product/templates/category/index.html
@@ -1,9 +1,10 @@
{% extends "base.html" %}
{% load i18n %}
-{% block title %}{{ block.super }} » {% trans "Products" %}{% endblock %}
+{% block title %}{{ block.super }} » {% trans "Category" %} {{ category }}{% endblock %}
{% block content %}
+<h2>{% trans "Category" %} {{ category }}</h2>
<ul>
{% for product in products %}
<li><a href="{{ product.get_absolute_url }}">{{ product }}</a></li>
diff --git a/saleor/templates/base.html b/saleor/templates/base.html
index 5da7df9d69..2dfe7ba65d 100644
--- a/saleor/templates/base.html
+++ b/saleor/templates/base.html
@@ -1,4 +1,5 @@
{% load i18n %}
+{% load categories_list from category %}
<!DOCTYPE html>
<html lang="en">
<head>
@@ -37,8 +38,11 @@
<li class="active">
<a href="/">Home</a>
</li>
- <li>
- <a href="{% url "product:index" %}">Products</a>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#"> {% trans "Categories" %} <b class="caret"></b> </a>
+ <ul class="dropdown-menu">
+ {% categories_list %}
+ </ul>
</li>
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="{% url "cart:index" %}">{{ request.cart }}</a>