sectioniconplugin placement fix

This commit is contained in:
Arvind Tiwari 2018-03-23 01:27:51 +05:30
parent 414b783983
commit 9a57c3341e
1 changed files with 5 additions and 1 deletions

View File

@ -31,8 +31,12 @@ class DCLSectionPlugin(CMSPluginBase):
context['children_to_right'] = []
context['children_to_left'] = []
if instance.child_plugin_instances is not None:
right_children = [
'DCLSectionImagePluginModel',
'DCLSectionIconPluginModel'
]
for child in instance.child_plugin_instances:
if child.__class__.__name__ == 'DCLSectionImagePluginModel':
if child.__class__.__name__ in right_children:
context['children_to_right'].append(child)
else:
context['children_to_left'].append(child)