Hi,
Thanks for your work on this module! I'm coming from #1263118: Have equivalent of Node Reference URL Widget, and this looks like it's a great step towards finding a solution for using the Node Reference URL Widget module with entity references.
I'm still missing one feature however: the ability of adding node links onto referenced entities. This is one aspect which imo makes the node reference url widget module so handy and easy to use.
Example: on all possible parent nodes add a link "Add child entity", which points to the node create page for the child content type, with the reference field value filled in already (via a respective url parameter). The link text+title should be configurable. See also the highlighted part #3 in this screenshot.
Is that something that can be added to this module, or is there already any other recommended way of achieving this behavior?
Comment | File | Size | Author |
---|---|---|---|
#25 | prepopulate_create_node_links.tar_.gz | 2.31 KB | hazah |
#20 | entityreference_prepopulate_node_links.tgz | 8.75 KB | hazah |
#19 | entityreference_prepopulate_node_links.tgz | 8.12 KB | hazah |
#13 | referenceable node links.png | 15.23 KB | clashar |
Comments
Comment #1
robydago CreditAttribution: robydago commentedMaybe I'm not understanding your request correctly, but isn't something this module can do?:
References dialog
Comment #2
bforchhammer CreditAttribution: bforchhammer commentedNot exactly; it's actually kindof the other way around... instead of filling a "child references" field on a parent with new child pages, I want links on the parent page which allow to create new child pages referencing the parent.
Hm, maybe have a look at this mustardseedmedia podcast which explains the node links feature... Minutes 5' to ~7' are the relevant ones; the "Add Story" link is what I'm talking about.
Comment #3
amitaibuI have added a CTools plugin under "Entity reference" that allows adding node create links. I'm still missing the "redirect" option.
Comment #4
bradyemerson CreditAttribution: bradyemerson commentedAmitaibu, is this plugin separate? I am not seeing a ctools plugin you speak of, would you mind providing more info?
Thanks for your hard work!
Comment #5
amitaibuAre you using latest dev?
Comment #6
rwilson0429 CreditAttribution: rwilson0429 commentedI have accomplished this functionality using the Entity Reference module, Reference Dialog module and Entity Views Attach module.
Comment #7
mike27 CreditAttribution: mike27 commentedPlease, can you explain how you did that in steps?
Thank you
Comment #8
rwilson0429 CreditAttribution: rwilson0429 commentedThis can be accomplished with the References Dialog module, Entity Reference, Entity Views Attach and, the Entity Reference Prepopulate modules. Per the References Dialog project page,
Step by Step: Adding and editing child nodes while viewing parent nodes and visa versa using referenced entities and views
You will need to create two content types. One will be the parent and the other will be the child in the reference relationship.
Entity type:Node
Bundles: [select the parent bundle, i.e. Gallery]
Arguments:id
Show title:Yes (optional)
edit: The contextual filter you select here should be the entity reference field in your child content that points to the bundles you select under the Entity Content Settings of the view.
In the View's footer section (or wherever you want the 'add link' to appear), create a global: Text Area and put the following link in there:
<a href="/node/add/[your-child-content-type]?[your-reference-field-machine-name]=[nid]">add new [child-node]<a/>
Once you save the view, you should see an 'add new [child-node]' displayed on your parent nodes.
For convenience, I placed all of the View displays mentioned above into a single view. If this is an approach you want to try but, the instructions are too confusing, let me know and I'll give a shot at rewriting.
that's pretty much it. The above steps will place a 'add link' on the parent nodes to add a child node, and place a 'add link' on the child nodes which points to the node create page for the parent content type, with the reference field value filled in already (via a respective url parameter). Also, note that the Reference Dialog module also adds a new display to Views named Reference Dialog. You can use the Views Reference Dialog display type to apply additional filters to the references that are made available when viewing or editing your parent or child nodes. Once you setup a Reference Dialog display in Views, you'll see additional options on your content type configuration pages that uses the Reference Dialogs.
As you can tell, I have not mastered the art of writing good step by steps but, I hope this makes some sense and that it helps you get started in the right direction.
Comment #9
mike27 CreditAttribution: mike27 commentedThank you for your extensive reply. I 'll try it right away and let anyone know.
M.
UPDATE: "Add link" is not shown. Maybe I missed sth in the contexual filter? My settings are:
Content: Type
Provide default value: Content ID from URL
Specify validation criteria: Validator - Content | Content type - Parent| Filter value format - Node ID
I followed steps several times, but th link is not added. Is there any way to test it manually from url?
For example in Drupal 6 you could put (theme | test) "Add link" manually using the following format:
node/add/CHILD/Arg, where Arg is NID from referenced PARENT node
Thank you for your time,
M.
Comment #10
rwilson0429 CreditAttribution: rwilson0429 commented@mike27, To place a 'add' content link on the parent content type to create a child node. You will need to create a relationship of Entity Reference: [parent-content-type] on the Entity Content display created in step 10.
Add the NID of the parent content type to the view in the Fields section and select to use the relationship that you created. You can exclude it from the display if you desire but, it is needed for its token value.
In the View's footer section (or wherever you want the 'add link' to appear), create a global: Text Area and put the following link in there:
<a href="/node/add/[your-child-content-type]?[your-reference-field-machine-name]=[nid]">add new [child-node]<a/>
Once you save the view, you should see an 'add new [child-node]' displayed on your parent nodes.
So, to summarize the steps outlined above, I had a parent content type named 'gallery' and a child content type named 'image'. On the image content type, I had a entity reference field named 'gallery'. On the 'gallery' field, I enabled entity prepopulate and configured the entity reference information. I then, created a view that contained a entity content display (see steps starting at 10 -15) to attach a view of related child nodes to parent. I creaded a Reference Dialog Search View display to place an 'add, edit and search dialog' on the child nodes that pointed to the parent content bundle. I added a relationship of Entity Reference: Referenced Entity (A bridge to the Content entity that is referenced via field_gallery) to the entity content display. I added the parent NID by using the relationship. I added a Global:Text area in the Footer section of the view and in the text area I put <
a href="/node/add/image?field_gallery=[nid]">add new image<a/>
and, checked the box to "Use replacement tokens from the first row".For convenience, I placed all of the View displays mentioned above into a single view. If this is an approach you want to try but, the instructions are too confusing, let me know and I'll give a shot at rewriting.
Comment #11
bforchhammer CreditAttribution: bforchhammer commented@rwilson0429: nice workaround, but creating a separate view for this seems a bit of an overkill, don't you think? ;-)
From looking at the code, that module is a ctools "content_types" plugin which can be used with panels. Is it possible to somehow make it available for use without panels? (Maybe as a pseudo-field that is automatically added to the parent content type?)
Comment #12
rwilson0429 CreditAttribution: rwilson0429 commented@mike27, yeah it was a bit much but, it worked ok for me. Your idea of making the er ctools pluggin that allow adding node create links available without requiring use of panels sounds like a good idea.
Ideally, the Entity Reference Prepopulate module would duplicate and expand on all the functionality of the Node Reference URL module. As bforchhammer stated in making the feature request, it seems that the only thing that is missing is giving users the option of choosing whether a link should appear on nodes that can be referenced. The feature of the Node Reference URL that allowed users to select to have a link appear on nodes that can be referenced, was a nice an very useful feature.
If this feature is added to the Entity Reference Prepopulate module, there would be no key functionality of the References module that users could not easily duplicate in the Entity Reference module. So, I'm hoping the maintainer will consider this feature request seriously and make it available through the UI.
I thank Amitaibu for creating this module so quickly. I need to start learning how to code so that I can be more of a help in these type of matters.
Comment #13
clashar CreditAttribution: clashar commentedI agree that adding built-in functionality to ERPP would be very useful.
I attach screenshot of this option in Node Reference URL Widget.
Comment #14
clashar CreditAttribution: clashar commentedrwilson0429,
I'm trying to follow your instructions and on step 11:
"Set the Contextual filter of the Entity Content View display to the parent content. For example, I've been using Gallery as the parent in this setup. So, my contextual filter will look like: 'content: Gallery'."
I can't find that filter, I can see for example "Content: Type ",
or "Content: Education (field_cv_edu) Appears in: node:cv."
where "field_cv_edu" is a field in "cv" content type
but can't find like 'content: cv'.
Could you please describe more detailed this step.
Comment #15
rwilson0429 CreditAttribution: rwilson0429 commented@clashar,
In step 11, the contextual filter that you select shoud be the entity reference field in the child content that points to the parent content. So, set the Contextual Filter to your entity reference field. You can find it easily by typing the name of your reference field in the Contextual Filter search box.
If 'field_cv_edu' is your entity reference field in your cv content type, then, select that as your contextual filter.
Comment #16
kitikonti CreditAttribution: kitikonti commentedi have tried #8 but dont work for me
so in the meantime, if this is a help for someone.
my workaround for the add link is a block which i only place on the node type of my parent nodes with the following content:
you have to place 'node/add/produkt-request' with 'node/add/[CONTENTTYPE-CHILD]'
and 'field_product_id_ref' with the name of your reference field.
Comment #17
clashar CreditAttribution: clashar commentedrwilson0429,
thank you for explanation.
I tried several times to implement this, still got no success.
All I got now is the view entity displayed on parent node, but no "add" links on child or parent.
Seems I should try to do all from the start...
Comment #18
clashar CreditAttribution: clashar commentedkitikonti, thank you for your code, I believe it could be only a temporary solution?
Comment #19
hazah CreditAttribution: hazah commentedI too needed this functionality and could not find a solution that made me happy. It all just seems to heavy for the small problem that this is. So I cooked up a very small two function module to handle the case of nodes linking to nodes. It lacks configuration at the moment, so it works in an all or nothing fashion upon enabling. I am planning on adding in configuration to control which content types links are enabled. Take a look. See if this suits your needs in the meantime. I would not mind some constructive criticism as this is my very first module (Giggady).
I based the link injection code on the core book module, and the link assembly on the
entityreference_prepopulate_create_node_links
function. The current version assumes a ul. Since I do not know if I could have tampered with that I by passed it completely and assembled the links by making the same array that is assembled in the book module.Some additional thoughts I have, and I don't know if I'm alone:
?field_foo=#
into/field_foo/#
or even/foo/#
(automated setting of the $_GET var or is this shunned upon? If it is, it's probably still worthwhile by doing this some other, proper way).Comment #20
hazah CreditAttribution: hazah commentedI added the functionality that is mentioned in my previous post. I think it could be considered a complete module at this point.
Please let me know what you think.
Comment #21
clashar CreditAttribution: clashar commentedhazah, thank you for providing the module.
I enabled it and went to entity ref. field settings, then I got this error:
Warning: Invalid argument supplied for foreach() in form_type_checkboxes_value() (line 2251 of Z:\home\paris11.kz\www\emploi\includes\form.inc).
I'm on localhost, so you wouldn't see paris11.kz domain.
But option: "Enable Entity reference prepopulate node links" is available and also content type choosing.
So I checked options and saved the field and no error appeared after.
Comment #22
clashar CreditAttribution: clashar commentedotherwise your module seems to work)
Comment #23
mike27 CreditAttribution: mike27 commentedI confirm that solution #8 works very well.
Thanks,
mike
Comment #24
hazah CreditAttribution: hazah commentedYes, I've had that happen to me to, at somepoint. I thought I had the issue corrected. I've made it into a contrib module (it's still in the sandbox because there's some coding style issues and it's on the main branch), but you can check it out, it should work without the error (also, I've changed the name because it was a little too clunky).
Comment #25
hazah CreditAttribution: hazah commentedI've attached the version of the module that is currently waiting for review. It should install through the admin interface (at least, it did for me).
Comment #26
clashar CreditAttribution: clashar commentedhazah, seems to works fine now.
whether it is possible to easily implement also "add" function?
I mean to add a node from previously created view, I see only "create" or "edit".
Comment #27
hazah CreditAttribution: hazah commentedI'm not entierly clear on the question. Could you provide an example of what you mean? Just a brief description of the setup should do. Also, it's probably best to now post it as an issue on the project's page: http://drupal.org/sandbox/hazah/1488826 to keep things in one place. Sound good?
Edit: Do you mean have the links available when using a View? If so that is on my plate at the moment, as I need the same thing. Have a look at this issue #1490110: Views support, and let me know if this is the same request. I think it is.
Comment #28
clashar CreditAttribution: clashar commented@hazah,
sorry for not correct question in my comment #26.
I will write feature and support requests on your module's page
Comment #29
samtheory2718 CreditAttribution: samtheory2718 commentedThank you hazah for your great work! I'm using the module you posted, and I can't wait until it becomes official!
I was wondering if anybody knew of a similar solution for links on taxonomy term pages, either to Term Reference fields or Entity Reference fields.
Comment #30
hazah CreditAttribution: hazah commentedIt's in the plans. Though I've never specifically mentioned taxonomy on my project page, I did mention entities. The current choice to do nodes mainly stems from the fact nodes are meant for content, so they are a rather special entity in this regard. I can definately see how catering to taxonomy would be beneficial. Especially with a complicated tree structure, where you would navigate to a child term to place content. I think you should open another issue on my project (I'm short on time now). Let this issue get closed as I don't think there will be a lot of focus on it from this project. Especially now that there is a working (unofficial) module :).
Comment #31
hazah CreditAttribution: hazah commentedAfter further dubbing in code, I think this may yet be another module for this because taxonomy references are a completely different beast in the core. In some sense it makes sense to have a specialized field there because of its unique parent-child term relationships. So I feel that the best, and cleanest, approach would be to have a small prepopulate module dedicated to that field type, along with the same features. Perhaps, if the core adopts Entity Reference itself for its Term References, this duplication could be avoided. At the moment, my brain power isn't sophisticated enough to see a way out.
Comment #32
jaxpax CreditAttribution: jaxpax commentedHi!
I've been following this great thread, especially interested in having a "Add a node" link at the parent node. Everything works just fine with the Entity content view, showing child nodes together with the parent node.
But I have no luck in having the link
<a href="/node/add/child?field_reference=[nid]">add new child<a/>
triggering the child content type, prepopulated with the parent nid. It triggers the right content type but I have no luck in having [nid] catching any nodeID through the relationship of Entity Reference.I am especially interested in this way of doing it, with the use of a link in the Global text in the header/footer area. My idea was to have a button:
<form class="views-exposed-form" method="link" action="/node/add/child?field_reference=[nid]"><input class="form-submit" type="submit" value="Add a child node"></form>
I'm very interested in having this feature on my new site, but I don't feel like having to do implement it with the References module.
Comment #33
hazah CreditAttribution: hazah commentedhttp://drupal.org/sandbox/hazah/1488826
Is this not doing it for you? I started that module for the explicit purpose of what you're describing.
Comment #34
jaxpax CreditAttribution: jaxpax commentedYour excellent job does exactly what I want, with the use of a "add more ..." link. But what if I would want to use a
<form>
button instead of a text link? Could your module help me accomplish that?Comment #35
hazah CreditAttribution: hazah commentedI will gladly help. Can you explain more about your use case as an issue on that project's page?
Comment #36
jakobbebop CreditAttribution: jakobbebop commentedHazah, I just git cloned your code -- it seems like you removed all the files from the master branch (only the README file remains; doing
git checkout 93b258aa
restores the actual module code, which I will proceed to try out later today :-)Thanks! Jakob.
Comment #37
hazah CreditAttribution: hazah commentedgit checkout 7.x-1.x
Use that branch. The nice code checker told me to do that while I'm awaiting approval.
Comment #38
hazah CreditAttribution: hazah commentedFeel free to reopen, but I believe my new coming module resolves this issue. Cheers.
Comment #39
amitaibuthanks hazah :)
Comment #40
Adam S CreditAttribution: Adam S commentedI created a short tutorial how to implement Rules Link to function like the Nodereference URL Widget with any entity using a little bit of code taken from the latter module. Since the Node API is just a wrapper around the Entity API in Drupal 7 I don't understand why nodes are being forced. For every function in the Node API there is a similar function in the Entity API.
http://drupal.org/node/1376838
Comment #41
hazah CreditAttribution: hazah commentedThe choice to do nodes is because nodes represent content. Entities can represent anything. Also entity api isnt part of core.
Comment #42
Adam S CreditAttribution: Adam S commentedThis module is dependent on Entity API. There will be lots of cases where non node entities can benefit from this such as with users, profile2, media and other entities.
Comment #43
mobonobomo CreditAttribution: mobonobomo commentedI've been following this thread for a while, since this is functionality that I really need for a current project. "Create Prepopulate Node Links" is a great start, but I have multiple child content types, and the new project only shows one at this point. So, I went ahead and created an extensive tutorial that covers multiple child content types, displaying the related child content on the parent page, and adding "Add new (child content type)" links on the parent pages - with screenshots! The link is: http://drupal.arxic.com/node/28
Comment #44
hazah CreditAttribution: hazah commentedcool. Thanks for that. I do appologize for thr slow progress on my part.
Comment #45
mobonobomo CreditAttribution: mobonobomo commentedNo worries, I realized also that I may want to position my "Add new..." links in other places (easily) than the node links area. Eventually there will be several Flags in that area and I realized it might be a bit cluttered. In my example, I put the "Add new..." links in their own EVAs, but I have also now replicated them in blocks so that I can have them right at the top of on of the sidebars.
Comment #46
hazah CreditAttribution: hazah commentedI was going for the least augmentation possible. My idea was that with views you can place links anywhere you want... or override the template, etc. Hence the choice.
Comment #47
WorldFallz CreditAttribution: WorldFallz commentedThough it really seems odd that this isn't included in the module, it's also easily doable with either the computed_field or token_field modules which I usually have installed already anyway. Adding a module or a view for just this one little function seems wasteful to me imo.
Comment #48
portulacaI can confirm that the method from post #8 works! I didn't need References Dialog though just to have the "Add child of this parent" link. EVA is great!
But there's a bug in EVA you need to be aware of, once you create the EVA views display it doesn't automatically display on nodes. To make it appear you first have to visit the "Manage fields" page of the parent node type, only then you will see the views listed on the "Manage display" page.
Comment #49
clashar CreditAttribution: clashar commentedIf anybody have tested whether the method from #8 does work with i18?
Comment #50
rwilson0429 CreditAttribution: rwilson0429 commented@WorldFallz: Would you share some details of your "easily doable" solutions mentioned int #47, plz?
Comment #51
WorldFallz CreditAttribution: WorldFallz commentedsure!
The simplest way is to use token_field to display the link (set it to
<a href="/node/add/child?field_fieldname=[node:nid]&destination=node/[node:nid]">Add child</a>
) and then use field_permissions to control display of the field.A little more complex is to use a computed_field with the following for the 'Display code':
Replacing 'child' with the machine name of the content type and 'fieldname' with the name of the entityreference field.
It can also be done in a preprocess function, template file, or with hook_node_view_alter-- there's really any number of ways to do it. Basically, any way you're comfortable with adding a link should work. The way nodereference_url did it was just really clean and dead simple.
Comment #52
rwilson0429 CreditAttribution: rwilson0429 commented@ WorldFallz. Awesome man. Thanks so much.
Comment #53
clashar CreditAttribution: clashar commentedWorldFallz, couls you please say how to use token_field with i18.
It works well for english, but if I try to include language prefixes like "fr", "ru", it doesn't work, I tried to include:
<a href="/fr/node/add/ja?field_appl_ref_jp=[node:nid]&destination=node/[node:nid]">
Apply to this jobbut field "field_appl_ref_jp" isn't filled.
Comment #54
WorldFallz CreditAttribution: WorldFallz commentedsorry clashar, I haven't used i18. It's not really an entityreference_prepopulate issue-- you might post to the i18n.
Comment #55
iRex CreditAttribution: iRex commented@WorldFallz - as regards your suggestions (which are simply brilliant, or brilliantly simple, btw) I would like to restrict access to the child link (e.g., "Apply Here" in the following way -
How can I do that?
Comment #56
Zombie777 CreditAttribution: Zombie777 commentedHello, just getting started in entity reference and I am having problems following the walk through. I don't get an attach to field settings group, just service field settings and entity selection and I don't get an option for node on target type. Am I missing modules? I have the latest download of the modules mentioned. However it is a bit frustrating when I need to do what is being shown but can't because something seems to be missing. I could really use this functionality, any ideas of what might be happening?
Comment #58
Yuri CreditAttribution: Yuri commented@WorldFallz: you say
"The simplest way is to use token_field to display the link (set it to <a href="/node/add/child?field_fieldname=[node:nid]&destination=node/[node:nid]">Add child</a>) and then use field_permissions to control display of the field."
Which indeed is quite obvious, but the next question is: how to create a view that lists all child content types of the viewed content type? Once we have that, the fields can be rewritten that way I guess.
Comment #59
WorldFallz CreditAttribution: WorldFallz commentedsorry yuri i have no clue what you mean-- i'm not sure what views has to do with this issue (which is about providing a link similar to what nodereference_url does).
Comment #60
Yuri CreditAttribution: Yuri commentedYes you are right, this is about node links, not about a separate block (like organic groups has) sorry. I was looking for a way to put the prepopulate create links in a views pane(without having to install new modules). I'll post this as separate issue.
Comment #61
hazah CreditAttribution: hazah commentedMy module does this already. As I posted much earlier in this thread: http://drupal.org/sandbox/hazah/1488826
Comment #62
Yuri CreditAttribution: Yuri commented@hazah: Thank you, great work! I do have problems getting your module to work in views, however. Can you assist me with that? (I posted a request on your project issues).
Comment #63
hazah CreditAttribution: hazah commentedNo problem :). Yes, I will try to get you going.
Comment #64
pennykara CreditAttribution: pennykara commentedI followed #8 by rwilson0429 which worked nicely (many thanks rwilson0429 for taking the time to document).
I found that I did not need the "References Dialog" module.
There was, though, a problem, if the view did not return any result (which happened when there were no child nodes for the parent node). My Global:Text Area in the footer set to:
<a href="/node/add/child?field_reference=[nid]">add new child</a>
was not applied to, even though I had the "Display even if the view has no results" option clicked. I placed some (arbitrary) text in the Global:Text Area and still I did not have any results.I followed the instructions at #10 by rwilson0429 and add a relationship and a Title:nid field via the relationship, but still no "Add " content link will be displayed in the parent node, if there we no children. After spending a whole day experimenting I concluded that I needed neither the relationship nor the Title:nid field to provide the token [nid] (as suggested in #10), but:
SOLUTION
I went to the Advanced section of the view and in the NO RESULTS BEHAVIOR I placed some text in the Global: Text area. This forced the view, when there were no results, to look in the My Global:Text Area in the footer of the view, and hence I now always have an "Add" content link.
Comment #65
hosais CreditAttribution: hosais commentedsub
Comment #66
WorldFallz CreditAttribution: WorldFallz commented@hosais -- besides the fact this issue is fixed and not likely to be updated, please use that nice big green button at the top of the page.
Comment #67
autopoietic CreditAttribution: autopoietic commentedcreating additional views etc to achieve this seems a bit of a hack - @azuledu has created a sandbox module that simply allows the site maintainer to 'add node link' in the field>edit, which is then appears in the node actions:
https://drupal.org/comment/6462042#comment-6462042
works for me - could this not be added to the entity reference prepopulate module? It is quite a common usecase, similar to the book module's 'add child page' (which also uses appears in node actions)
Comment #68
WorldFallz CreditAttribution: WorldFallz commentednope... that comment just links to hazah's module which is linked above right in this thread multiple times. it's really helpful if you take the time to read a thread before adding a comment.
Comment #69
amitaibuCan someone update the issue summary, I'm pretty confused about what the issue is.
Comment #70
paulwdru CreditAttribution: paulwdru commented@amitaibu
Please look at Node Reference URL Widget and its Amazing Screencast , you'll know what the issue is.
In short, EntityReference Prepopulate is not as complete as Node Reference URL Widget which is really amazing easily streamlining the parent & child nodes relationship, providing 1-to-Many linking out of the box.
Also, the add-on Hazah http://drupal.org/sandbox/hazah/1488826 seems to have been abandoned nowhere.
Comment #71
paulwdru CreditAttribution: paulwdru commentedAnother amazing part of Node Reference URL Widget is it does provide a Returned Path setting, can be configured to automatically jump back to the Parent Node after creating a Child Node via the link provided and the alternative solutions mentioned above do not yet provide this feature
Comment #72
hazah CreditAttribution: hazah commented@paulwdru It's not abandoned per-se. Difficult to find the time with a day job :(.
Comment #73
senzaesclusiva CreditAttribution: senzaesclusiva commentedD 7.36
Entity Prepopulate (7.x-1.5+5-dev) and Prepopulate Create Node Links works well togheter for me.
At this point, the only thing that diffears from "node reference url widget" (for my main use) is the chance to customize "url text" as an alternative to the default "add new [type]"
Thx
Comment #74
le dendrite CreditAttribution: le dendrite commentedthis function is fundamental for me.
any chance i can get a update on the status of this?
thanks.
Comment #75
le dendrite CreditAttribution: le dendrite commented------please revise as updated issue summary as per request in comments. thanks ------
node types that can be referenced by another via a ER prepopulate field should have a link allowing so (create new node and fill ERP field(S)), from the node view.
example.
node of type-A (product) has a ERP field awaiting reference of a node of type-B (certificate), which has a similar field referencing node of type-A.... so viewing nodes of type-A should have a link to "create content' of type-B (certificate). which then autofills the ERP fields of both type-A and type-B. so the entities are married in a relationship....
Comment #76
kitikonti CreditAttribution: kitikonti commented@le dendrite
i think it would be better to use the relation module for a reference in both directions.
Comment #77
le dendrite CreditAttribution: le dendrite commented@ kitikonti thanks i'll try that.
i'm recreating a d6 site in d7 but using a lot of different modules. still figuring out all the changes and replacement modules and such after taking a lot of time off from all this...
thanks much for the reply. have good.
Comment #78
delacosta456 CreditAttribution: delacosta456 commentedhi
if i am not wrong an alternative and simple possibility could be (after setting up everything related to entityreference prepopulate module) :
1- Install and enable the Command buttons Module
2- Install and enable the Token Module (if not already installed)
2- In your site at
admin/structure/command-buttons
create a button, and for the "URL" write :node/add/(the content type you want to create machine name )?(the entity reference field machine name)=[current-page:url:unaliased:args]
the word in bracket mean that you have to replace it with it's mean and the alias at the end of the link don't have to be changed.
Note: don forget the question mark between the centent type machine name and the entity reference field machine name
Example of url :
node/add/article?field_articleinfo=[current-page:url:unaliased:args]
Comment #79
FO CreditAttribution: FO commentedHi,
In my case, using Link and Token Filter modules was a good solution to create a link to add new child content from the parent entity, with Entity Reference Prepopulate.
And to hide the field in the edit form, Field Extra Widget.
Comment #80
AnybodyZips are not accepted. Please create a proper merge request.