You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try a category with only the Filter portlet in one portlet. Then look at one or many products of this category. The bug (offset in slot) cames from the function 'has_portlets' in
lfs-theme / lfs_theme / templatetags / lfs_theme_tags.py. In this case 'has_portlet' is True because parent of the product = category has one portlet, but the rendered of this portlet is empty with show="False" in the product.
To fix it, I suggest to remove 'has_portlet' by a new function : has_portlets_rendered
def has_portlets_rendered(obj, slot,context):
portlets_list = []
rendered_list = ''
while obj:
portlets_list = portlets.utils.get_portlets(obj, slot)
for p in portlets_list:
rendered_list = (''.join(p.render(context)))
if len(rendered_list.strip()) > 0:
return True
if portlets.utils.is_blocked(obj, slot):
break
try:
obj = obj.get_parent_for_portlets()
except AttributeError:
break
return False
The text was updated successfully, but these errors were encountered:
Try a category with only the Filter portlet in one portlet. Then look at one or many products of this category. The bug (offset in slot) cames from the function 'has_portlets' in
lfs-theme / lfs_theme / templatetags / lfs_theme_tags.py. In this case 'has_portlet' is True because parent of the product = category has one portlet, but the rendered of this portlet is empty with show="False" in the product.
To fix it, I suggest to remove 'has_portlet' by a new function : has_portlets_rendered
def has_portlets_rendered(obj, slot,context):
portlets_list = []
rendered_list = ''
while obj:
portlets_list = portlets.utils.get_portlets(obj, slot)
for p in portlets_list:
rendered_list = (''.join(p.render(context)))
if len(rendered_list.strip()) > 0:
return True
if portlets.utils.is_blocked(obj, slot):
break
try:
obj = obj.get_parent_for_portlets()
except AttributeError:
break
The text was updated successfully, but these errors were encountered: