Copied to clipboard

Flag this post as spam?

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


  • Sven Vervloet 4 posts 74 karma points
    Mar 12, 2019 @ 20:34
    Sven Vervloet
    0

    How to render Arknu.Umbraco.Relations ?

    Hi,

    we have a site in development where the owner expressed his desire to have a relational navigation. It is a site with multiple languages. When you are on a page and switch languages, you should go to the related page. Since Umbraco already keeps relations, why not use them.

    This afternoon I installed Arknu.Umbraco.Relations (https://github.com/arknu/Arknu.Umbraco.Relations). In the backoffice, this shows as we want.

    In the generated model however, the property returns an object.

    [ImplementPropertyType("relations")]
        public object Relations
        {
            get { return GetRelations(this); }
        }
    
        /// <summary>Static getter for Relations</summary>
        public static object GetRelations(IAdvanced that) { return that.GetPropertyValue("relations"); }
    

    I have no clue how to render it in my razor views. Could anyone point me in the right direction?

Please Sign in or register to post replies

Write your reply to:

Draft