Browse files

stack plugin working

  • Loading branch information...
1 parent de3db5d commit 3786fed1d57b6f3d214c2ce5d09676c1959e582c @digi604 committed Oct 26, 2012
Showing with 7 additions and 3 deletions.
  1. +3 −1 stacks/cms_plugins.py
  2. +4 −2 stacks/templates/cms/plugins/stacks.html
View
4 stacks/cms_plugins.py
@@ -2,6 +2,7 @@
from cms.plugin_base import CMSPluginBase
from django.utils.translation import ugettext_lazy as _
from stacks.models import StackLink
+from cms.plugins.utils import get_plugins
class StackPlugin(CMSPluginBase):
model = StackLink
@@ -10,10 +11,11 @@ class StackPlugin(CMSPluginBase):
render_template = "cms/plugins/stacks.html"
def render(self, context, instance, placeholder):
-
+ plugins = get_plugins(context['request'], instance.stack.content)
context.update({
'object': instance,
'placeholder':placeholder,
+ 'plugins':plugins,
})
return context
View
6 stacks/templates/cms/plugins/stacks.html
@@ -1,2 +1,4 @@
-{% load placeholder_tags %}
-{% render_placeholder instance.content "640px" %}
+{% load cms_tags %}
+{% for plugin in plugins %}
+ {% render_plugin plugin %}
+{% endfor %}

0 comments on commit 3786fed

Please sign in to comment.