@@ -219,7 +219,7 @@ class RenderChildPluginsTag(Tag):
219219 {% endchildplugins %}
220220
221221 Keyword arguments:
222- name -- the name of the placeholder
222+ instance -- instance of the plugin whose children are to be rendered
223223 plugin_type -- optional argument which if given will result in filtering
224224 the direct child plugin types that are rendered.
225225 or -- optional argument which if given will make the template tag a block
@@ -230,7 +230,7 @@ class RenderChildPluginsTag(Tag):
230230 options = Options (
231231 # PlaceholderOptions parses until the "endchildplugins" tag is found if
232232 # the "or" option is given
233- Argument ("instance" , required = True ),
233+ Argument ("instance" , required = False ),
234234 Argument ("plugin_type" , required = False ),
235235 Argument ("verbose_name" , required = False ),
236236 blocks = [("endchildplugins" , "nodelist" )],
@@ -254,6 +254,9 @@ def render_tag(self, context, instance, plugin_type, verbose_name, nodelist):
254254 kwargs ["slots" ] = [(plugin_type , verbose_name )]
255255 context ["_cms_components" ]["cms_component" ][0 ] = (args , kwargs )
256256
257+ if not instance :
258+ instance = context .get ("instance" , None )
259+
257260 context .push ()
258261 context ["parent" ] = instance
259262 content = []
0 commit comments