2
votes

I've created a custom document type that points to a website. It has just a DocumentName field and a Path field. You can place these documents under themselves. So you can have DocA with Doc1, Doc2, Doc3 under it in the content tree. My transformation code looks like this:

<li class="CMSListMenuLI">
    <a class="CMSListMenuLink" href="<%# Eval("Path") %>"> <%# Eval("DocumentName") %> </a>
    <p><%# Eval("NodeAliasPath") + "/%" %></p>
    <ul>
        <cms:CMSRepeater runat="server" ID="Repeater1" TransformationName="whirlpool.deptNav.MenuList" ClassNames="whirlpool.deptNav" Path='<%# Eval("NodeAliasPath") + "/%" %>' />
    </ul>
</li>

As you can see, I'm trying to create a nested list that represents the content tree's structure. However, the internal repeater never returns anything. It uses the same transformation that I have listed above.

3
Does it load anything if you change the path on the nested repeater to just %? That should load anything of the type whirlpool.deptNav no matter where they are on the site. If it does, then your path is the problem. If it doesn't, then something else is going on. - Doozer Blake
If I do that it will break because it will keep calling the same path over and over forever. Basically the only difference between this repeater and it's parent repeater, is that it adds the /% to the path to check for more docs under it. I will go back and double check the path though. - Stephen__T
What control is calling this tranformation? - Piers Karsenbarg
Are you not using the CSS list menu webpart just because of the <p> tag? - anar khalilov

3 Answers

0
votes

Have you tried setting the Path value hardcoded temporarily? I suspect it may have some trouble with the inline code.

0
votes

If you always want to get only the children items of the parent repeater, then set the "Nested Controls ID" in the webpart properties of the parent repeater. Setting this property will force the inner repeater to always use the path as you have described - that is, the path of their parent.

Alternatively if you are trying to set the path to be somewhere else in the content tree and not inherit the path of the parent, then do not set the "Nested Controls ID" property, but instead on the inner repeater, specify that path you need and then set "DelayedLoading" to true in order to allow the control to "break out" from its parent's path and find documents in other path of the CMS Tree.

Edit: Also I just noticed that you are possibly trying to use the same transformation on the outer and inner repeaters, which creates a sort of recursive transformation structure. Is this correct? If so have you had any luck?

0
votes

Try using the attribute DelayedLoading="true" on the Repeater control.

Otherwise inline code like Path='<%# Eval("NodeAliasPath") + "/%" %>' will get processed after the repeater data-binds.

Easily enough tested - Put a static version of the path and see if you get results.