Copied to clipboard

Flag this post as spam?

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


  • Sangeeta 20 posts 80 karma points
    Mar 06, 2013 @ 13:50
    Sangeeta
    0

    uComponents Multi node picker works only for home page and not for other pages

    Hi,

    im using Umbraco 4.11, i installed uComponents and using its Multi node picker with no issues.

    I have multi node picker on my homepage i.e. (index.aspx) to display list of products when user hovers on Products & Services menu

    So the problem is..when im on home page..i can see Products list when i hover on Products & Services menu.

    But as soon as i navigate to Products & Services page..products list doesnt loads.

    im using inline razor macro to display products list as below:

                         @foreach (var item in Model.ProductsList)
                              {   
                                   <li><a href="@item.Url">@item.Name</a></li>
                              } 

    ProductsList is a multi node picker present on home page (i.e. index.aspx)

    i can only understand that since multi-node picker (ProductsList in my case) is on home page ..it is not accessible when i visit Products & Services .and hence products list doesnt comes.

     

    So if any one has any work aroud for this..Please share.

    Thanks

     

  • Sangeeta 20 posts 80 karma points
    Mar 06, 2013 @ 14:32
    Sangeeta
    100

    Hi,

    i solved it by small change in my razor syntax..it is not the recommended way but it works for me..and if any one has best alternative for this then please share..here is  my code:

     

     @foreach (var item in Model.NodeById(1112).ProductsList)
                              {   
                                   <li><a href="@item.Url">@item.Name</a></li>
                              }   
                                

    i hard coded node id so that it will always refer to index.aspx -> prodcuts list (multi node picker)

     

     

Please Sign in or register to post replies

Write your reply to:

Draft