@@ -8,7 +8,7 @@ | |||||
<article class="blog-content" itemscope itemtype="http://schema.org/BlogPost"> | <article class="blog-content" itemscope itemtype="http://schema.org/BlogPost"> | ||||
<!-- begin blog content --> | <!-- begin blog content --> | ||||
<div class="help" style="color: #aaa"> | <div class="help" style="color: #aaa"> | ||||
<span itemprop="author">{{ blogger_info and blogger_info.full_name or full_name }}</span> / | |||||
<span itemprop="author">{{ blogger_info and blogger_info.full_name or full_name }}</span>, | |||||
<span itemprop="dateCreated">{{ updated }}</span></div> | <span itemprop="dateCreated">{{ updated }}</span></div> | ||||
<br> | <br> | ||||
<div itemprop="articleBody"> | <div itemprop="articleBody"> | ||||
@@ -2,7 +2,7 @@ | |||||
{%- for child in children -%} | {%- for child in children -%} | ||||
<div class="sidebar-item"> | <div class="sidebar-item"> | ||||
<i class="icon-fixed-width | <i class="icon-fixed-width | ||||
{% if child.rgt - child.lft != 1 and not loop.first %}icon-chevron-right{% endif %}" | |||||
{% if (child.lft != None) and (child.rgt - child.lft != 1) and (not loop.first) %}icon-chevron-right{% endif %}" | |||||
style="margin-left: -17px; color: #ddd;"></i> | style="margin-left: -17px; color: #ddd;"></i> | ||||
<a href="{{ child.name }}" class="no-decoration {% if child.name == pathname %}active{% endif %}"> | <a href="{{ child.name }}" class="no-decoration {% if child.name == pathname %}active{% endif %}"> | ||||
{{ child.page_title }} | {{ child.page_title }} | ||||
@@ -44,13 +44,6 @@ def build_sitemap_options(path): | |||||
set_sidebar_items(sitemap_options, sitemap_options.pathname, home_page) | set_sidebar_items(sitemap_options, sitemap_options.pathname, home_page) | ||||
if not sitemap_options.children: | if not sitemap_options.children: | ||||
set_sidebar_items(sitemap_options, sitemap_options.parent_website_route, home_page) | set_sidebar_items(sitemap_options, sitemap_options.parent_website_route, home_page) | ||||
if path != home_page: | |||||
sitemap_options.children = [frappe.doc("Website Route", | |||||
sitemap_options.parent_website_route).fields] + sitemap_options.children | |||||
else: | |||||
if path != home_page: | |||||
sitemap_options.children = [sitemap_options] + sitemap_options.children | |||||
# determine templates to be used | # determine templates to be used | ||||
if not sitemap_options.base_template_path: | if not sitemap_options.base_template_path: | ||||
@@ -81,3 +74,6 @@ def set_sidebar_items(sitemap_options, pathname, home_page): | |||||
and t1.docname = t2.name | and t1.docname = t2.name | ||||
order by t2.{sort_by} {sort_order}""".format(**website_template.fields), | order by t2.{sort_by} {sort_order}""".format(**website_template.fields), | ||||
pathname, as_dict=True) | pathname, as_dict=True) | ||||
sitemap_options.children = [frappe.doc("Website Route", pathname).fields] + sitemap_options.children | |||||