Copied to clipboard

Flag this post as spam?

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


  • stuart.crouch 17 posts 37 karma points
    Jun 11, 2014 @ 00:41
    stuart.crouch
    0

    Is there a walkthrough or guide on how to use this?

    I cant figure out how to create relationships with this.  The readme doesnt really explain whats going on and I think it requires some precursor knowledge of umbraco that I just dont have.

    It doesnt help that I dont know where I should start seeing things appear when I have got the XML right.  Can you help me get this set up please?

    So far I have two Document types, Parent and child.  I want to be able to have multiple children of the parent.  I figured this would work (again just guessing from the short explanation in the readme)

    <RelationEditor>
        <ObjectType Name="Document" Alias=""Parent">
            <EnabledRelation Alias="Child" />
        ObjectType>
    </RelationEditor>

    After that I thought I should see something either in the configuration of the document type, or as part of the actual document. Nothing appears in either.

    How do I set up the module and add relationships?

    Thanks

    Stuart

  • Lars-Erik Aabech 349 posts 1100 karma points MVP 8x c-trib
    Jun 11, 2014 @ 12:46
    Lars-Erik Aabech
    0

    You need to create a relation type under developer/relations in the backoffice.

    I'm also about to release a new version with a UI for configuration.

    Are you at cg by the way? I can show you instead. 😊

  • stuart.crouch 17 posts 37 karma points
    Jun 11, 2014 @ 12:56
    stuart.crouch
    0

    I wont be at cg. I dont use umbraco enough yet for it to be worth my while.

    So I found the admin interface. Still not enough info to get there myself...  Which of these fields do I put where in the XML?

    Or is that it, I just set up the XML like I have, do the developer bit and it should work?  What should I see when it works, because it still doesnt seem right?

    Thanks for the help by the way.  I need to get this working as a Proof of Concept, so need your help with this version. I'll check out the new one if I get this running.

  • Lars-Erik Aabech 349 posts 1100 karma points MVP 8x c-trib
    Jun 11, 2014 @ 13:01
    Lars-Erik Aabech
    0

    With you config, it would enable a relation with "Child" as alias on nodes of the "Parent" document type. When it's right, you'll get a new menu item called "Edit relations" on parents.

    Mind that the config is case sensitive.

  • stuart.crouch 17 posts 37 karma points
    Jun 11, 2014 @ 13:52
    stuart.crouch
    0

    Ok. I set up this

    3
    Alias
    Document
    Document
  • stuart.crouch 17 posts 37 karma points
    Jun 11, 2014 @ 13:54
    stuart.crouch
    0

    And I now see "edit relations" under the actions menu on parent1 ( a piece of content from my parent document type).

    Clicking on it just pops out an empty panel saying "Assign related items to parent" and cancel/save.  I have two child nodes, how do I add them to the parent?

  • Lars-Erik Aabech 349 posts 1100 karma points MVP 8x c-trib
    Jun 11, 2014 @ 14:37
    Lars-Erik Aabech
    0

    You should see a heading called ParentChildRel with an add button.

    Did you set the enabledrelation alias to the alias of the relation type?

  • stuart.crouch 17 posts 37 karma points
    Jun 11, 2014 @ 14:49
    stuart.crouch
    0

    Aha. Got it.

    So the two tasks are

    1) Set up a relationship type under developer/relations

    2) Create an xml containing the source of the relationship, and the relationship type (using its alias)

    This now raises 2 new questions. 

    I seem to be able to create relations between any document type, is there a way to restrict it to just the two types?

    Is there a way of programmatically creating these relationships? 

    My end goal is that I will have a flag to say which parent is active, and any children created will be linked to that parent when the record is saved.

  • Lars-Erik Aabech 349 posts 1100 karma points MVP 8x c-trib
    Jun 13, 2014 @ 04:50
    Lars-Erik Aabech
    0

    You can use ApplicationContext.Current.Services.RelationService to programmatically create relations.
    You can add <EnabledChildType Alias="[doctypealias]"/> under the enabledRelation element to restrict it.

  • Per Hemmingson 1 post 21 karma points
    Mar 02, 2015 @ 14:07
    Per Hemmingson
    0

    Hello, 

    I too have issues with this, I get edit relations button when right clicking the content page, but as described above its just blank page.

    I just want a plain bi-directional Page to Page relationship between my ArticleModel pages.

    I have created a relation in Developer/relations in backoffice with the parent and child type as Document.

    I took the alias specified above (articleRelation) and added it to the relationEditor.config

      <ObjectType Name="Document" Alias="ArticleModel">
       <EnabledRelation Alias="articleRelation">
         <EnabledChildType Alias="ArticleModel"/>
       </EnabledRelation>
     </ObjectType>

     

    What am I missing?

    cheers

Please Sign in or register to post replies

Write your reply to:

Draft