Reputation: 27
I have the following menu structure:
Personal
PersonalOption1
Sub-Option1
Sub-Option2
PersonalOption2
Enterprise
EnterpriseOption1
EnterpriseOption2
From the Page on Sub-Option1, I'm trying to generate a page_menu to only show:
But based on the branch_level value, I'm getting:
This is the tree I'm getting using branch_level to identify each node:
Personal (branch_level: 0)
PersonalOption1 (branch_level: 1)
Sub-Option1 (branch_level: 2)
Sub-Option2 (branch_level: 2)
PersonalOption2 (branch_level: 1)
Enterprise (branch_level: 1)
EnterpriseOption1 (branch_level: 1)
EnterpriseOption2 (branch_level: 1)
Enterprise should have branch_level 0.
Upvotes: 1
Views: 147
Reputation: 46
Hello if you are far ahead in your development i am sorry for you. If not, run away as far as you can from mezzanine. The documentation for this CMS is scarce.
Lucky for you you can solve this by using "page.branch_level" instead of just "branch_level". The former, will give you the depth of the current branch, and the latter will give you the depth of the page related to the page tree. Hope this can help you.
Upvotes: 1