1

I would like to have a special "sub-node" that could be attached to other Drupal nodes, that allows authors to include commentary (from the author, so this isn't a comment node) and sample text, to the parent node.

I plan to use the exact same fields for the author commentary and sample text, and to create a view that lists both together. So, it would be OK to use the same node type for both the author commentary and sample text, or at least the same fields. This might also be useful for having an "address" node that could be attached to various nodes and then displayed together on a listing page.

I think the solution would include using node reference fields, but I get tripped up when it comes to theming the parent node form.

My question is similar to this one:
Create multiple CCK nodes with single custom form in Drupal

Community
  • 1
  • 1
Biagio Arobba
  • 1,075
  • 11
  • 27

1 Answers1

0

I think the best way to do this would be to create a view to display nodes that use the node reference field. It's tricky the first time you do it, but easy once you understand how views arguments work.

I found this helpful http://drupal.org/node/161867

d3l3t3m3
  • 211
  • 1
  • 10
  • Ok, I get it. So, I don't need to have one monolithic node form, but instead, I could tie the nodes together using views. (In addition, I could have links from the parent node to add and edit the sub-nodes.) – Biagio Arobba Jul 07 '10 at 09:53
  • Yes, that's correct. There are a lot of requests to provide an API for repeating "form fieldsets", as opposed to just repeating fields but that is a ways off from happening. Until then it's best to breakup your content into different nodes. – d3l3t3m3 Jul 07 '10 at 16:52