Try our conversational search powered by Generative AI!

Container.Indent is always 0 in PageTree ItemTemplate

Vote:
 

I'm trying to create a menu control using the EPiServer PageTree control. I want to render the items differently in the ItemTemplate depending on the indent level. In the IndentTemplate Container.Indent has a value, but not in the ItemTemplate. There it is always 0.

Why is it so? Is there a workaround for it?

#59245
May 25, 2012 16:32
Vote:
 

Are you using a binding expression and Container.CurrentPage.Indent?



#59261
May 27, 2012 21:00
Vote:
 

I use <%# Container.Indent%> . Container.CurrentPage.Indent is from the old days.

#59265
May 28, 2012 8:10
Vote:
 

Ahh, it's a bug (no 76618) in EPiServer CMS 6 R2. See this link for more info. It is NOT fixed in the 501 hotfix!

Oh, and the problem is with the ItemHeaderTemplate, not the ItemTemplate as I wrote.

#59266
Edited, May 28, 2012 8:19
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.