Skip to content
Permalink
Browse files

Merge pull request #3 from Level-Up/master

Fix to remove draft cms pages from the sitemap
  • Loading branch information...
Raphael Jasjukaitis
Raphael Jasjukaitis committed Apr 18, 2013
2 parents 01ea46b + 7df47d7 commit 3664ac54a324098ca3f99179a18e43c7b9d9b830
Showing with 1 addition and 0 deletions.
  1. +1 −0 cmsplugin_htmlsitemap/cms_plugins.py
@@ -20,6 +20,7 @@ def render(self, context, instance, placeholder):
site = Site.objects.get_current()
pages = Page.objects.published(site=site).order_by('tree_id', 'lft')
pages = pages.filter(level__gte=instance.level_min, level__lte=instance.level_max)
pages = pages.filter(publisher_is_draft=0)
if not instance.in_navigation is None:
pages = pages.filter(in_navigation=instance.in_navigation)
if instance.match_language:

0 comments on commit 3664ac5

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