Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Problem with transformation View modes: 
User avatar
Certified Developer 8
Certified Developer 8
liquidmagic - 1/16/2013 6:50:31 AM
   
Problem with transformation
Hello,

I have a transformation that looks like this:
<%@ Register Src="~/CMSWebParts/Viewers/Documents/cmsrepeater.ascx" TagName="repeater" TagPrefix="uc1" %>
<item>
<guid isPermaLink="false"><%# Eval("NodeGUID") %></guid>
<title><![CDATA[<%# Eval("DocumentName") %>]]></title>
<categoryid><%# Eval("newscategoryid") %></categoryid>
<smalldescription><![CDATA[<%# Eval("smalldescription") %>]]></smalldescription>
<mainText><![CDATA[<%# Eval("mainText") %>]]></mainText>
<photo><![CDATA[<%# GetFileUrl("carouselNews_130x100") %>]]></photo>
<pubDate><%# FormatDateTime(Eval("DocumentLastPublished"), "yyyy-MM-dd HH:mm:ss") %></pubDate>
<link><![CDATA[<%# GetAbsoluteUrl(GetDocumentUrlForFeed(), Eval("SiteName")) %>]]></link>
<DocumentWorkflowStepID><%# Eval("DocumentWorkflowStepID") %></DocumentWorkflowStepID>
<rtmp><%# Eval("rtmp") %></rtmp>
<current><%# Eval("NodeAliasPath") %></current>
<uc1:repeater runat="server" ID="ShowRelatedVideo" ClassNames="Site.video" TransformationName="Site.Video.VideoForRSS" Path= Eval("NodeAliasPath") SelectOnlyPublished="true" HideControlForZeroRows="true" EnableViewState="false" />
</item>

On the bottom I am trying to display some elements that are under the
document used on the transformation. I want to alter the
Path=Eval("NodeAliasPath") to something that gets the documents under
it. So, I need something like that Path=Eval("NodeAliasPath")/%

How can I do it?

Any help is appreciated.

Thank you,
Dimitris

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/17/2013 12:24:27 AM
   
RE:Problem with transformation
You'd have to modify your code to look like so:
Path='<%# Eval("NodeAliasPath") %>'
so it would be evaluated server side and display the value you want. Otherwise by default, it should automatically choose all documents below that particular node based on the class name you have provided if you leave it blank.

User avatar
Certified Developer 8
Certified Developer 8
liquidmagic - 1/17/2013 4:07:49 AM
   
RE:Problem with transformation
Hello,

thank you for the reply. This would return documents on the same level, right? I want to have the documents under the document in the transformation.

I added /% next to it but it didn't work. Any other ideas?

Dimitris

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/19/2013 1:49:23 AM
   
RE:Problem with transformation
Hi,

1. In transformation you can use controls only! Web parts are not supported. So, if you want to use nested controls - in this case repeater control: cms:CMSRepeater

2. The properties are usually inherited from the parent control - so you may need to specify nested control ID if you want to inherit them or if it is not specified, they may not be inherited but you still may need to set the DelayedLoading property of the nested control to true.

Best regards,
Juraj Ondrus

User avatar
Certified Developer 8
Certified Developer 8
liquidmagic - 1/24/2013 3:25:46 AM
   
RE:Problem with transformation
Hello,

thank you for the reply.

I have tried to following with no luck.
<item>
<guid isPermaLink="false"><%# Eval("NodeGUID") %></guid>
<title><![CDATA[<%# Eval("DocumentName") %>]]></title>
<categoryid><%# Eval("newscategoryid") %></categoryid>
<smalldescription><![CDATA[<%# Eval("smalldescription") %>]]></smalldescription>
<mainText><![CDATA[<%# Eval("mainText") %>]]></mainText>
<photo><![CDATA[<%# GetFileUrl("carouselAlphaNews_130x100") %>]]></photo>
<pubDate><%# FormatDateTime(Eval("DocumentLastPublished"), "yyyy-MM-dd HH:mm:ss") %></pubDate>
<link><![CDATA[<%# GetAbsoluteUrl(GetDocumentUrlForFeed(), Eval("SiteName")) %>]]></link>
<DocumentWorkflowStepID><%# Eval("DocumentWorkflowStepID") %></DocumentWorkflowStepID>
<rtmp><%# Eval("rtmp") %></rtmp>
<current><%# Eval("NodeAliasPath") %></current>
<cc1:cmsrepeater DelayedLoading="true" StopProcessing="true" runat="server" ID="ShowRelatedVideo" ClassNames="Alpha.video" TransformationName="Alpha.Video.VideoForRSS" Path='<%# Eval("NodeAliasPath")+ "%" %>' SelectOnlyPublished="true" HideControlForZeroRows="false" EnableViewState="false" />
</item>

This is used on an RSS repeater that get data from a document data source. I get the data of the documents but the cc1:cmsrepeater does not return anything. I want it to return the documents under each element.

Any ideas?

Thank you,
Dimitris

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/24/2013 5:31:10 AM
   
RE:Problem with transformation
Hi,

Have you tried using the repeater control as I mentioned in my previous post? you are still using the web part which is not supported. Please, see also the nested controls documentation.

Best regards,
Juraj Ondrus