에서
덕분에 내가이 템플릿 태그를 추가 관리했습니다 ...
하지 exacly 무엇인지 잘 작동 wanted..but 전.
@register.inclusion_tag('tagging/lateral_menu.html', takes_context=True)
def lateral_menu(context):
object = context.get("category") or context.get("product")
if object.__class__.__name__.lower() == "product":
request = context.get("request")
category=lfs.catalog.utils.get_current_product_category(request, object)
else:
category = object
top_category=category
while top_category.parent is not None:
top_category = category.parent
categories =top_category.get_all_children()
return {"category" :category, "top_category" : top_category, "categories" : categories }
그런 다음 템플릿에서 필요한 모든 데이터를 얻을 수 있습니다.
내 메뉴를 생성하는 템플릿 태그를 사용하여 관리했습니다.
sandok
내가 처음에 원했던 금액은 아니지만 ...