ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Multi Relation for 2.x?

July 21, 2010 2:57pm

Subscribe [1]
  • #1 / Jul 21, 2010 2:57pm

    Digitaal Dier

    75 posts

    Hi guys,

    I already stumbled into Playa for 2.x, but basically all I need is to do what Multi Relation does (which unfortunately is only 1.x). Any thoughts on this? Is there an alternative to achieve what I’m trying to do (i’m trying to relate multiple services to single cases, which are both channels, in my portfolio)?

    Thanks 😊

  • #2 / Jul 21, 2010 3:03pm

    Lisa Wess

    20502 posts

    Playa is it unless you need only one to many (or reverse), in which case you can use the built-in relationships.

  • #3 / Jul 21, 2010 3:26pm

    Digitaal Dier

    75 posts

    Well I already managed to get a dropdown showing the related channel, but I want to be able to select multiple entries from the related channel… That’s a many to one right?

  • #4 / Jul 21, 2010 3:33pm

    Lisa Wess

    20502 posts

    Many to one would essentially be reverse relationships.

  • #5 / Jul 21, 2010 4:00pm

    Digitaal Dier

    75 posts

    Ok, so I found P&T Field Pack on GitHub, and was wondering whether it would work to fill it using the Query module? Or is the parsing order wrong for that?

  • #6 / Jul 21, 2010 5:00pm

    Lisa Wess

    20502 posts

    You’ve lost me, I’m sorry.  Can you explain what you are trying?

  • #7 / Jul 21, 2010 5:14pm

    Digitaal Dier

    75 posts

    Sure, sorry if I wasn’t clear enough. I have two channels:

    - Cases
    - Services (front-end, cms-implementation, e-mailmarketing, social media)

    When I add an entry to the channel “Cases”, I want to be able to select which services i delivered. I’ve found “P&T Field Pack” on GitHub (http://github.com/brandonkelly/pt_field_pack, P&T created Playa I think aswell), which has a “Multi-select” field. This sort of does what I want it to, except for the fact that it’s static (you have to preset options which you can select while publishing). So I thought: what if I declare a query where you’d normally set the options, sort of like this (warning: aircode ahead)

    {exp:query sql="SELECT title,id FROM entries WHERE channel == services"}
    {title} : {id}
    {/exp:query}

    If it would be rendered properly during publishing, this would return the id’s of the cases I’ve selected, then all I’d have to do is loop through those entries with exp:channel:entries by passing the id’s on to that… Am I making any sort of sense?

  • #8 / Jul 21, 2010 5:20pm

    Lisa Wess

    20502 posts

    There is also a first-party multi-select field, as well as checkboxes and radio buttons, etc.

    I would probably just use categories for your services rendered, though.  I think you may be over-complicating things, we see this somewhat commonly with experienced developers - but experienced in other systems. =)

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases