Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Luke Wilkinson 5 posts 25 karma points
    Nov 16, 2011 @ 21:10
    Luke Wilkinson
    0

    Umbraco:Item NodeId

     

    I have a asp:repeater control which I have binded an arraylist of nodes to. Is is possible to use umbraco:item controls inside the repeater control? I have tried setting the NodeId but it doesn't seem to work?

    <umbraco:Item runat="server" NodeId='<%# Eval("Id") %>' Field="map" />

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 16, 2011 @ 21:20
    Jan Skovgaard
    0

    Hi Luke

    Hmm if I remember correctly you should actually use pageID - try that out perhaps? - Must admit it's been a while since I attended level 2 certification and since I'm a frontend dev. it's not that often I find myself doing binding so I may be way offroad - but worth the try, right? :)

    /Jan

  • Luke Wilkinson 5 posts 25 karma points
    Nov 17, 2011 @ 20:10
    Luke Wilkinson
    0

    The control doesn't have that property?

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Nov 18, 2011 @ 01:10
    Bo Damgaard Mortensen
    0

    Hi Luke,

    Do you get any error message? :)

    - Bo

  • Rodion Novoselov 694 posts 859 karma points
    Nov 18, 2011 @ 07:36
    Rodion Novoselov
    0

    Hi, Luke. How does the collection that you use as a datasource look? Your repeater looks ok, it seems that you need to make sure that its datasource is not empty and each of its members has a property named "Id".

  • Luke Wilkinson 5 posts 25 karma points
    Nov 18, 2011 @ 20:06
    Luke Wilkinson
    0

    The datasource is an arraylist of nodes, I know it works because if I just declare <%# Eval("Id")%> it works on the screen so it's just the umbraco tags that don't seem to work with a node that isn't the current page?

  • Ken Sykora 17 posts 53 karma points
    Feb 17, 2012 @ 23:32
    Ken Sykora
    0

    I found the bug in Umbraco that's causing this to not work correctly. Please keep in mind that this fix isn't sanctioned by the Umbraco team but I've created a pull request that I hope they will accept soon and publish an official release containing this amongst any other fixes they have in the oven.

    Fork with the fix: http://umbraco.codeplex.com/SourceControl/network/forks/kensykora/47ItemControlFix?branch=4.7.1

    Pull Request: http://umbraco.codeplex.com/SourceControl/network/forks/kensykora/47ItemControlFix/contribution/1879

    Umbraco.dll download: http://db.tt/gy7nT2Uo

  • Vishal G.P 62 posts 122 karma points
    May 14, 2013 @ 20:01
    Vishal G.P
    0

    Hey... does this problem also occurs on 4.7.2

    I have the same problem.. 

    i have in my template: 

    <umbraco:item ID="Body" runat="server" Field="body" NodeId="<%= this.NodeId %>"  />       

    in my codebehind, try to add a dynamically nodeId..

     

    I even tried doing it using the object... lik Body.NodeId = '1234';

    But it doesnt render anything... 

    If i put a hard nodeID in the control like this, it renderd correctly...:

    <umbraco:item ID="Body" runat="server" Field="body" NodeId="2245" />        

    Where can i find the fixed dll?

     

  • Vishal G.P 62 posts 122 karma points
    May 14, 2013 @ 21:06
    Vishal G.P
    0

    dont worry.. i found it!! thanks

Please Sign in or register to post replies

Write your reply to:

Draft