Permalink
Browse files

Multisite-support added.

  • Loading branch information...
1 parent c58508f commit 93ed9debf564940db8b30b02fa2759f52bd8bd57 Raphael Jasjukaitis committed Jul 31, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 cmsplugin_htmlsitemap/cms_plugins.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
+from django.contrib.sites.models import Site
from django.utils.translation import ugettext as _
from cms.models.pagemodel import Page
@@ -11,7 +12,8 @@ class HtmlSitemapPlugin(CMSPluginBase):
render_template = 'cmsplugin_htmlsitemap/sitemap.html'
def render(self, context, instance, placeholder):
- pages = Page.tree.filter(published=True)
+ site = Site.objects.get_current()
+ pages = Page.objects.published(site=site).order_by('tree_id', 'lft')
context.update(
{'instance': instance,
'pages': pages

0 comments on commit 93ed9de

Please sign in to comment.