Advertisement
marksweb

content_base.html

Jul 9th, 2014
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.04 KB | None | 0 0
  1. {% extends "base.html" %}
  2. {% load cms_tags menu_tags cache %}
  3. {% with bgimage=request.current_page.backgroundimageextension.background_image %}
  4.  
  5. {% block title %}{% page_attribute 'title' %}{% endblock title %}
  6.  
  7. {% block content %}
  8.     <section id="content-landing">
  9.     {% if bgimage %}
  10.         <div class="article_image">
  11.             <div class="wrapper">
  12.                 {% if request.current_page.get_ancestors|length <= 1 %}
  13.                    <h1>{{ request.current_page.get_page_title }}</h1>
  14.                 {% else %}
  15.                     {% for ance in request.current_page.get_ancestors %}
  16.                         {% if ance.level == 1 %}
  17.                             <h1>{{ ance.get_page_title }}</h1>
  18.                         {% endif %}
  19.                     {% endfor %}
  20.                 {% endif %}
  21.             </div>
  22.             <div class="overlay_gradient"></div>
  23.             <div class="bg_image" style="background: url({{ bgimage.desktop }});"></div>
  24.         </div>
  25.     {% endif %}
  26.         <div id="article">
  27.             <div class="landing-wrapper cf">
  28.                 <div class="article-content">
  29.                 {% if not bgimage %}
  30.                     {% if request.current_page.get_ancestors|length <= 1 %}
  31.                        {% block page_title %}
  32.                        <h1 class="article_title">{{ request.current_page.get_page_title }}</h1>
  33.                         {% endblock page_title %}
  34.                     {% else %}
  35.                         {% for ance in request.current_page.get_ancestors %}
  36.                             {% if ance.level == 1 %}
  37.                                 <h1 class="article_title">{{ ance.get_page_title }}</h1>
  38.                             {% endif %}
  39.                         {% endfor %}
  40.                     {% endif %}
  41.                 {% endif %}
  42.                     {% block page-content %}
  43.                     {% endblock page-content %}
  44.                 </div>
  45.             </div>
  46.         </div>
  47.         <div class="clear"></div>
  48.     </section>
  49. {% endblock content %}
  50. {% endwith %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement