Technical support This forum is closed.
Version 1.x > Technical support > ASCX Transformation troubles View modes: 
User avatar
Member
Member
sciamannikoo - 12/22/2005 12:17:57 PM
   
ASCX Transformation troubles
Hi,

I've written an ASCX transformation, to see a series of downloads, under some text items.

This is the environment:

document templates:
- Application.Text (attributes: Title, Body)
- CMS.File

Transformations:

- Application.Text.Default:
<%@ Control %>
<%@ Register TagPrefix="cc1" Namespace="Kentico.CMS.CMSControls" Assembly="Kentico.CMS.CMSControls" %>
<h1>
<%# DataBinder.Eval(Container, "DataItem.Titolo") %>
</h1>
<p>
<%# DataBinder.Eval(Container, "DataItem.Corpo") %>
</p><%# DataBinder.Eval(Container, "DataItem.AliasPath") + "/%" %>
<cc1:CMSRepeater id="CMSRepeater1" runat="server" TransformationName="CMS.File.details" SelectNodesClassName="CMS.File" SelectNodesMaxRelativeLevel="1" SelectNodesOrderBy="FileName"
SelectNodesPath='<%# DataBinder.Eval(Container, "DataItem.AliasPath") + "/%" %>'
HideControlForZeroRows="True">
<FooterTemplate>
</ul>
</FooterTemplate>
<HeaderTemplate>
<ul>
</HeaderTemplate>
</cc1:CMSRepeater>

-CMS.File.detail:
something....

My trouble is that:
I cant see files under Application.Text documents.
If I try to set SelectNodesMaxRelativeLevel="-1", i see all CMS.File in my website.
If I try to set SelectNodesMaxRelativeLevel="2", i see right CMS.File documents, but under all Application.Text Items (!)
Is not right to use SelectNodesPath='<%# DataBinder.Eval(Container, "DataItem.AliasPath") + "/%" %>' ?

Thanks,
Andrea

User avatar
Guest
admin - 12/27/2005 3:55:09 PM
   
Re: ASCX Transformation troubles
Hi Andrea,

Thank you for your message. In this case, you need to use a hierarchical repeater. You can see an example in the Developer's Guide -> Knowledge base -> KB0015 - Displaying Hierarchical (Nested) Repeater.

Best Regards,