Copied to clipboard

Flag this post as spam?

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


  • Claude Sammut 2 posts 72 karma points
    May 02, 2018 @ 20:57
    Claude Sammut
    0

    contentpicker2 null

    Hello all, I'm quite new to Umbraco, I've got around to create my document types and displaying the fields in my template. I am now facing an issue displaying the links inside contentpicker2 as the value returned is always null. This is my code:

    IEnumerable<IPublishedContent> links = Umbraco.AssignedContentItem.GetPropertyValue<IEnumerable<IPublishedContent>>("footerQuickLinks", true);
    
    
                                if (links != null && links.ToList().Count > 0)
                                {
                                    <ul class="footer-quick-links-4 white">
    
                                        @foreach (RelatedLink link in links)
                                        {
                                            <li>
                                                <a href="@link.Link" target="=@(link.NewWindow ? "_blank" : null)">
                                                    <i class="fa fa-angle-right"></i>@link.Caption
                                                </a>
                                            </li>
                                        }
                                    </ul>
                                }
    

    PS: I'm using Umbraco version 7.10.0

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    May 03, 2018 @ 14:47
    Michaël Vanbrabandt
    0

    Hi Claude,

    can you show us your document type setup and content node?

    Thanks!

    /Michaël

  • Claude Sammut 2 posts 72 karma points
    May 03, 2018 @ 20:51
    Claude Sammut
    0

    Is this what you asked for? enter image description here enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft