ASPX templates
Version 6.x > ASPX templates > get data of parent View modes: 
User avatar
lucathanhtam-gmail - 3/11/2013 10:12:01 PM
get data of parent
Hi everyone, I have a problem and please help me. I have 2 control CMSRepeater, they nested, one is a details of product, the order is group of products. and I want to show details of product and show logo of group. I have tried to use wherecondion='<%# "NodeID="+ Eval("NodeParentID)"'. But it's error. please help me.

User avatar
Kentico Consulting
Kentico Consulting - 3/14/2013 7:40:59 AM
RE:get data of parent

If you are trying to resolve macros in aspx templates you need to use a different approach or else the macro wont be resolved. I tested a code which will return what you want so please take a look at it and adjust it to your needs.

Here is an example which displays the macro result in a label:

<script runat="server">
protected override void OnPreRender(EventArgs e)
lbl1.Text = CMS.CMSHelper.CMSContext.CurrentResolver.ResolveMacros("NodeID: {%NodeParentID%} ");
<asp:Label ID="lbl1" runat="server" Text="Label"></asp:Label>

Let me know if that works for you.

Kind regards,
Richard Sustek