Copied to clipboard

Flag this post as spam?

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


  • Kadir 30 posts 80 karma points
    Apr 20, 2013 @ 15:48
    Kadir
    0

    uComponents: Relation Links in Front End

    I am trying to have bidirectional categorisation system. I was following this tutorial which is pretty clear http://24days.in/umbraco/2012/who-picked-this/ But i don't know how could we display data of uComponents: Relation Links in the front end with razor. I am really stuck on this for weeks and I would appreciate any help.

    Have a nice weekend

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 20, 2013 @ 18:03
    Jan Skovgaard
    0

    Hi Kadir

    Could you perhaps show of some your current Razor code?

    And could you also please let us know what version of Umbraco you're using?

    /Jan

  • Kadir 30 posts 80 karma points
    Apr 20, 2013 @ 22:42
    Kadir
    0

    Hi Jan,

    First of all, thank you for reply.

    I actually don't have any code that can be a clue for you because I couldn't find any reference about this specific request in the umbraco library wiki. Maybe you could suggest me where to start from and what to look for.

    What I want to achieve is:
    I have category and article document types. When I am in articles I want to be able to navigate to article's category (this is easy to handle with node picker). But on the other hand I want to backlink to all related articles when I am in the category page. This is the bottleneck on my project :). I started to think, I am technically not capable to continue on this project, on the other hand I am really enjoying when working on umbraco :/.

    Best,

  • Martin Meixger 17 posts 75 karma points
    Jul 09, 2013 @ 14:22
    Martin Meixger
    1

    did this in v6.1.1

    @{
        var relationType = ApplicationContext.Services.RelationService.GetRelationTypeByAlias("relateArticleAndTaxon");
        var relations = ApplicationContext.Services.RelationService.GetAllRelationsByRelationType(relationType);
    }
    <ul>
        @foreach (var relation in relations) {
            var node = new Node(relation.ChildId);
            <li>@node.Name</li>
        }
    </ul>
Please Sign in or register to post replies

Write your reply to:

Draft