Commits

Kai Diefenbach committed fabdfdb

Using new metadata fields of shop and page.

Comments (0)

Files changed (6)

lfstheme/templates/lfs/base.html

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     <head>
-        <title>{% block title %}{{ SHOP.name }}{% endblock %}</title>
+        <title>{% block title %}{{ SHOP.get_meta_title }}{% endblock %}</title>
         <link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico" type="image/ico" />
 
         {% block head %}{% endblock %}

lfstheme/templates/lfs/catalog/breadcrumbs.html

             &gt;
             {% if forloop.last %}
                 {{ object.name }}
-            {% else %}                
+            {% else %}
                 <a href="{{ object.url }}">
                     {{ object.name }}</a>
             {% endif %}
-        </li>        
+        </li>
     {% endfor %}
-</ul>
+</ul>

lfstheme/templates/lfs/page/page.html

 {% load lfs_portlets_tags %}
 
 {% block title %}
-    {{ page.title }} - {{ block.super }}
+    {{ page.get_meta_title }} - {{ block.super }}
+{% endblock %}
+
+{% block head %}
+    {% if page.get_meta_keywords %}
+        <meta name="keywords" content="{{ page.get_meta_keywords }}" />
+    {% endif %}
+    {% if page.get_meta_description %}
+        <meta name="description" content="{{ page.get_meta_description }}" />
+    {% endif %}
 {% endblock %}
 
 {% block section %}page{% endblock %}
     {% breadcrumbs page %}
 {% endblock %}
 
-{% block left-slot %}
-    {% lfs_pages_portlet %}
-{% endblock %}
-
 {% block content %}
 
     <h1 class="first-heading">

lfstheme/templates/lfs/page/pages.html

     {% breadcrumbs _("Information") %}
 {% endblock %}
 
-{% block left-slot %}
-    {% lfs_pages_portlet %}
-{% endblock %}
-
 {% block content %}
 
     <h1 class="page-title">
         {% trans 'Information' %}
     </h1>
-    
+
     {% for page in pages %}
         <h2 class="page-title">
             {{ page.title }}
         <div class="more">
             <a href="{{ page.get_absolute_url }}">{% trans 'More' %}</a>
         </div>
-    {% endfor %}    
-{% endblock %}
+    {% endfor %}
+{% endblock %}

lfstheme/templates/lfs/shop/shop.html

 {% extends "lfs/base.html" %}
 {% load i18n %}
 
+{% block head %}
+    {% if shop.get_meta_keywords %}
+        <meta name="keywords" content="{{ shop.get_meta_keywords }}" />
+    {% endif %}
+    {% if shop.get_meta_description %}
+        <meta name="description" content="{{ shop.get_meta_description }}" />
+    {% endif %}
+{% endblock %}
+
 {% block breadcrumbs %}
     <ul class="breadcrumbs">
         <li>{% trans 'You are here:' %}</li>
 {% block content %}
     {{ shop.static_block.html }}
     {{ shop.description|safe }}
-{% endblock %}
+{% endblock %}

lfstheme/templatetags/lfs_theme_tags.py

     """
     """
     def render(self, context):
-
-        object = context.get("category") or context.get("product")
-
+        object = context.get("category") or context.get("product") or context.get("page")
         if object is None:
             object = lfs.core.utils.get_default_shop()