Custom Fields
Re-Envisioned
Support MB Relationships MB Relationships – Connection Metadata?

This topic contains 7 replies, has 3 voices, and was last updated by  lobstervine 1 year, 2 months ago.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #8277

    Anh Tran
    Keymaster

    Hi, it’s the next step. The first version hasn’t supported metadata for connections yet. We’ll work on that a little bit later.

    #8309

    lobstervine
    Participant

    Thank you! I have installed MB Relationships but am having trouble with the very first step. When I add the code to create a relationship (pasted below) to my functions file, it breaks the site. Am I missing something? I notice it says “Note: you need to hook to mb_relationships_init to make sure the API is ready for use.” — is that a separate step and if so do you have documentation for that piece?

    add_action( 'mb_relationships_init', 'prefix_register_relationships' );
    function prefix_register_relationships() {
        MB_Relationships_API::register( array(
            'id'   => 'posts_to_pages',
            'from' => 'post',
            'to'   => 'page',
        ) );
    } );
    #8339

    jo.on
    Participant

    That is correct. There still are some errors in the documentation for this extension. In the code you added, remove the very last two characters: “);” They are not supposed to be there.

    #8345

    Anh Tran
    Keymaster

    Oh, sorry. jo.on is right. There’s a syntax error in the code. Please just remove the last “);”. I supposed to write code for PHP 5.3, but then changed to the normal syntax (and forget to remove the last “);”).

    #8360

    lobstervine
    Participant

    Thank you both! Silly me, I should have been able to figure that one out. I have it working now.

    Another question for you: I read in the documentation (and see by using the plugin) that on the “to” post/page, you can view the connected posts only and can’t edit them. For my project, this is quite limiting. (With posts2posts, you can edit connected posts/pages from both the “from” and “to” post/page edit screens.) Is it possible to enable editing from the “to” post/page with MB Relationships?

    #8367

    Anh Tran
    Keymaster

    It should be able. I’ve just received the bug report and will work on that now.

    PS: I’m done. Will update the extension tomorrow.

    #8370

    lobstervine
    Participant

    Great! Thanks, will look for update & try it out tomorrow.

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.