{% extends "oscar/catalogue/browse.html" %}

{% block title %}{% if category.seo_title %}{{ category.seo_title }}{% else %}{{ block.super }}{% endif %}{% endblock %}
{% block description %}{% if category.seo_description %}{{ category.seo_description }}{% else %}{{ block.super }}{% endif %}{% endblock %}


{% block extrahead %}
{% block keywords %}{% if  category.seo_keywords %}<meta name="keywords" content="{{ category.seo_keywords }}" />{% endif %}{% endblock %}
{% if category.seo_title %}
    <meta name="twitter:title" content="{{ category.seo_title }} — {{ request.site.site_name }}" />
    <meta property="og:title" content="{{ category.seo_title }} - {{ request.site.site_name }}" />
{% endif %}
{% if category.seo_description %}
    <meta name="twitter:description" content="{{ category.seo_description }}" />
    <meta property="og:description" content="{{ category.seo_description }}" />
{% endif %}

<meta property="og:type" content="Category overview" />

{% if request.build_absolute_uri %}<meta property="og:url" content="{{request.build_absolute_uri}}" />{% endif %}

{% if request.site.site_name %}<meta property="og:site_name" content="{{ request.site.site_name }}" />{% endif %}

{% if category.image %}
    <meta name="twitter:image" content="{{ request.scheme }}://{{ request.get_host }}{{ category.image.url }}" />
    <meta property="og:image" content="{{ request.scheme }}://{{ request.get_host }}{{ category.image.url }}" />
{% endif %}

{{ block.super }}
{% endblock %}
