Extension for multi-select in relationship field?
Posted: 17 September 2006 07:00 PM   [ Ignore ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1505
Joined  05-15-2004

It was mentioned in this thread that it might be possible through extensions to allow a multi-select for a relationship field, allowing a one-to-many relationship to be setup without the need to create a custom field for each relationship needed.

Is this something anyone has played around with?

I am looking at implementing related entries in a couple of different ways on my sites, but the lack of this functionality seems to make the process much more awkward. Take, for example, this example:

Two blogs, one with author bios and one with reviews. I’d like the entry for a specific author to display all reviews of books by that author that I have. The easiest way to accomplish this would seem to be to create a relationship field in the author blog, link this to the review blog, and—if multi select in the drop down was allowed—selecting all the relevant reviews and displaying them with the regular related entries tags.

However, as multi-select isn’t available, it seems the only approach (if I have grasped how this works) is to create the relationship field in the review blog, link this to the author blog, and for each review select the relevant author which then it would take the tags for reverse related entries to display.

 Signature 


:: Westeros :: Hippoi Athanatoi ::

Blackadder: “Baldrick, have you no idea what irony is?”   
Baldrick: “Yeah! It’s like goldy and bronzy, only it’s made of iron.”
Blackadder III, Amy and Amiability

Profile
 
 
Posted: 19 September 2006 12:33 PM   [ Ignore ]   [ # 1 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

I have developed this and am working on finalizing it now, however it seems that it would be better for you to link the review to the author anyways.  If you take a logical workflow the author would be created first in their weblog.  Then a review would be written and, going your way, the author would then be linked to that review.  This would require the admin to write the review, switch over to edit, find the authors name, enter the edit screen for the author, and select the new review from that multi-relationship.  However, if the link was the other way, once the author was created the admin would simply have to write the review and then, still in the review, relate that to the author.  The second way you mentioned seems to be far fewer clicks and a much easier workflow.

That said, I will let you know how my development of this progresses if you’re still in the market.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 19 September 2006 02:09 PM   [ Ignore ]   [ # 2 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1505
Joined  05-15-2004

The workflow varies, actually. smile In general I add a bio for an author only when I have added a certain number of reviews by that author.

Given this, I would be interested in trying something like this out. I believe the main concern from the developers was that it would be fairly processing-intensive. Have you been able to determine whether this is the case or not?

 Signature 


:: Westeros :: Hippoi Athanatoi ::

Blackadder: “Baldrick, have you no idea what irony is?”   
Baldrick: “Yeah! It’s like goldy and bronzy, only it’s made of iron.”
Blackadder III, Amy and Amiability

Profile
 
 
Posted: 19 September 2006 04:04 PM   [ Ignore ]   [ # 3 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

I’ve been able to do it without too much processor difficulty, however I never implemented a template hook because I always found the EE Templating system to be slow and always wrote my templates in straight PHP anyways.  I will work on implementing the extension into a template and let you know how I fare.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64885 Total Logged-in Users: 63
Total Topics: 81811 Total Anonymous Users: 38
Total Replies: 439806 Total Guests: 320
Total Posts: 521617    
Members ( View Memberlist )
Newest Members:  kikibalkhulaidi19Hotcards.comShrike67Dynamic1justingpticketjendicottdxrsmdanbilly