1

I have a package (node with few entity reference fields - one per content type). Example enter image description here

So on package node I can select nodes that are related (one reference per content type).

Now I have new request: create a view with a list of all products and on each row (product) make possible to select package this product belongs to - for example: set ref_to_shirt if product in this row is a shirt.

Note that reference field is on package and there are multiple reference fields (one per content type).

List will look something like this: enter image description here

Any sugestion? I was wondering if its possible to set this as VBO action with some Rules component, but for now I'm open to any solution.

Thanks

1 Answer 1

0

Edit: this approach is only for listing the assignments, not changing them.

--

First make sure that the product content types have a common view mode. Pick "teaser" for example.

Create two views:

  • Products list: the "outer view" to list all the t-shirts, pants shoes.

  • Packages per product: based on a contextual filter, list all package assignments of a given product. As you have different fields link the product content types with the packages you might want to start with one type. Once it works, replicate the view/view display for the other product types.

The second view now needs to be embedded into the teaser view of products. My preferred way of doing so is using panelizer to override the teaser view mode but you can also do this using the "Eva" module.

Hope this helps :)

2
  • Also see drupal.org/project/editableviews
    – dasjo
    Commented Jan 24, 2015 at 9:52
  • Thanks, for reply. Most important part is to how set relation between package and product.
    – rolkos
    Commented Jan 26, 2015 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.