Skip to content
Permalink
Browse files

Merge pull request #4 from acspike/master

Limit results to published pages
  • Loading branch information...
Raphael Jasjukaitis
Raphael Jasjukaitis committed May 13, 2014
2 parents 67e97ad + 307efd7 commit 4304fb784cd83c57caaa02fb31e21f6f7d226437
Showing with 2 additions and 3 deletions.
  1. +2 −3 cmsplugin_htmlsitemap/cms_plugins.py
@@ -18,10 +18,9 @@ class HtmlSitemapPlugin(CMSPluginBase):

def render(self, context, instance, placeholder):
site = Site.objects.get_current()
pages = Page.objects.published(site=site).order_by('tree_id', 'lft')
pages = Page.objects.public().published(site=site).order_by('tree_id', 'lft')
pages = pages.filter(level__gte=instance.level_min,
level__lte=instance.level_max,
publisher_is_draft=False)
level__lte=instance.level_max)
if not instance.in_navigation is None:
pages = pages.filter(in_navigation=instance.in_navigation)
if instance.match_language:

0 comments on commit 4304fb7

Please sign in to comment.
You can’t perform that action at this time.