[development] Node reference in core?

Kevin Reynen kreynen at gmail.com
Tue Mar 13 16:30:59 UTC 2012


Organic Group?

We deal with a similar issue with community media.  Producers have a
Project/Series which contains multiple Shows/Episodes.  Most stations
organic groups to associate the Shows to the Project... which has the
added bonus of allowing multiple users permission to update the
Project as well as provide the relation for other content types as
well (like the taxonomy suggestion).

We require users to submit Shows individually because there is a lot
of additional metadata for the Show.  To save time, we included an
option in cm_project to set the Project's value as the default for any
field shared between the two types.

Seems like if would be easy enough to add form fields to add X number
of track nodes when the Album node is created using the OG to
establish the relation.

- Kevin

On Tue, Mar 13, 2012 at 8:22 AM, Karen Stevenson <karen at elderweb.com> wrote:
> One way to solve this in D7 is to use either a combination of Node Reference
> and Node Reference URL or Entity Reference and Entity Reference Prepopulate.
> Node Reference URL and Entity Reference Prepopulate are alternative widgets
> for those fields that let you set a value in the url. They also create an
> 'Add new ...' link on the referring entity that will go to the url to add a
> new node, set the value by reference to the source node, and then return you
> to the place you started.
>
> That won't make it possible to create multiple tracks at once, but it does
> let you create the album first, then click on an 'Add new track' link on the
> album to add tracks to it. The technique for doing this in D6 is described
> in http://www.lullabot.com/articles/photo-galleries-views-attach and used by
> http://drupal.org/project/views_gallery. The same technique works in D7
> using either of the above combinations.
>
> Karen
>
>
> On Thu, Mar 1, 2012 at 12:40 PM, Earnie Boyd <earnie at users.sourceforge.net>
> wrote:
>>
>> On Thu, Mar 1, 2012 at 12:53 PM, Daniel F. Kudwien wrote:
>> > Am 01.03.2012 17:19, schrieb Karl Giesing:
>> >
>> >> Furthermore, we also need the ability to add Track nodes as we are
>> >> creating an Album node - that is, we need the ability to create
>> >> multiple
>> >> nodes, and their references, all from the single form used to create an
>> >> album. What should NOT happen is that the user has to create each track
>> >> individually before they create an album that has those tracks - this
>> >> is
>> >> a workflow nightmare. (And it's currently how Pushtape works.)
>> >>
>> >> There are currently three D7 modules used to create node references:
>> >> References, Entity Reference, and Relation. References is the only one
>> >> not currently in beta - and it's being depricated in favor of one of
>> >> the
>> >> other two. Furthermore, as far as I can tell, none of the above allow
>> >> you to create the references unless the nodes already exist.
>> >
>> >
>> > Creating 0-n other entities as part of the initial creation/form flow of
>> > a
>> > parent entity, and handling that correctly in terms of what data to
>> > store
>> > where and what to do in case of validation errors down the line, is the
>> > tricky part.
>> >
>>
>> How about taxonomy?  You could have a term for the album and each
>> track node for the album adds the term.
>>
>> --
>> Earnie
>> -- https://sites.google.com/site/earnieboyd
>
>


More information about the development mailing list