[development] Node reference in core?

Karen Stevenson karen at elderweb.com
Tue Mar 13 13:22:03 UTC 2012

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-attachand
used by
http://drupal.org/project/views_gallery. The same technique works in D7
using either of the above combinations.


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20120313/4a0e4ee0/attachment.html 

More information about the development mailing list