Copied to clipboard

Flag this post as spam?

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


  • Meni 271 posts 507 karma points
    May 26, 2013 @ 20:10
    Meni
    0

    How to retrieve data from the Content Picker with Razor?

    Hello

    I try to use the Content picker w/o success..

    I created a doc type which the properties are Content pickers, so what I try to do is along the magazine to use this page to pick up the features news / etc and display them on home page. w/o success..

     

    I used something like:

    dynamic feature_news_item = Library.NodeById(1111); (tried also the same but with Model: Model.NodeById(1111);
    var node = @feature_news_item.NodeById(Model.contentPicker);
        <a href="@feature_news_item.Url">@feature_news_item.Name</a>

     Now, my content picker property is featureItemNews

    so I also tried

    var node = @feature_news_item.NodeById(Model.featureItemNews);
        <a href="@feature_news_item.Url">@feature_news_item.Name</a>

    and also

    var node = @feature_news_item.NodeById(Model.contentPicker.featureItemNews);
        <a href="@feature_news_item.Url">@feature_news_item.Name</a>

    Nothing...

    Doesen't retrieve the feature_news_item.Url nor the feature_news_item.Name

    Actually what I want to do is according to the information I get from the content picker to retrieve the properties from the page that the content picker choose and then to display the Page.title page.Image page.summary (title, image and summary are properties of typical news page in the magazine).

    Not work ...

    Any idea pls how can I do it?

    Thanks!

     

  • Charles Afford 1163 posts 1709 karma points
    May 26, 2013 @ 21:08
    Charles Afford
    0

    Hi i replied on your other post

  • Meni 271 posts 507 karma points
    May 26, 2013 @ 21:36
    Meni
    0

    Thanks. By mistake it posted it twice ...

Please Sign in or register to post replies

Write your reply to:

Draft