Skip to main content
added 549 characters in body
Source Link
MDr
  • 17
  • 7

I have the following problem I can't figure out how to solve - note I am a Drupal newbie...

I have two content types; TypeA and TypeB. TypeA includes an entity reference field of TypeB to create a static relationship, similar to a "related work" or "is part of" use case.

This relationship displays fine in the full display mode for TypeA and all is well on that front.

I fail, however, to display this relationship as a mapping table in a third content type, where all TypeB nodes represents columns, and all TypeA nodes are displayed in individual rows like the following example:

Example:

Consider we have the following three nodes of TypeB: NodeA, NodeB, and NodeC.

We also have 5 nodes of TypeA, all along with the following relationships to TypeB nodes as follows:

  • Node1 (NodeA, NodeC)
  • Node2 (NodeA)
  • Node3 (NodeB, NodeC)
  • Node4 ()
  • Node5 (NodeA, NodeB, NodeC)

The mapping table then would look like this:

      | NodeA | NodeB | NodeC
------|-------|-------|------
Node1 |   X   |       |   X
------|-------|-------|------
Node2 |   X   |       |
------|-------|-------|------
Node3 |       |   X   |   X
------|-------|-------|------
Node4 |       |       | 
------|-------|-------|------
Node5 |   X   |   X   |   X

Obviously, I do not want to maintain this table manually, but be built depending on the actual dynamic content of the site.

EDIT

The following constraints also apply (forgot to mention them in the first place):

  • When I unpublish or delete a node of content type TypeB, the entire column of this mapping table needs to disappear
  • The view (anticipating that I can implement this through crafty Views configuration) should not be cached, or cache-cleared upon change (is that even possible?)
  • The "X" in the example table would ideally be replaceable with other code or content I control (e.g. a little image, or glyph or so)

Thanks a lot,

Michel

I have the following problem I can't figure out how to solve - note I am a Drupal newbie...

I have two content types; TypeA and TypeB. TypeA includes an entity reference field of TypeB to create a static relationship, similar to a "related work" or "is part of" use case.

This relationship displays fine in the full display mode for TypeA and all is well on that front.

I fail, however, to display this relationship as a mapping table in a third content type, where all TypeB nodes represents columns, and all TypeA nodes are displayed in individual rows like the following example:

Example:

Consider we have the following three nodes of TypeB: NodeA, NodeB, and NodeC.

We also have 5 nodes of TypeA, all along with the following relationships to TypeB nodes as follows:

  • Node1 (NodeA, NodeC)
  • Node2 (NodeA)
  • Node3 (NodeB, NodeC)
  • Node4 ()
  • Node5 (NodeA, NodeB, NodeC)

The mapping table then would look like this:

      | NodeA | NodeB | NodeC
------|-------|-------|------
Node1 |   X   |       |   X
------|-------|-------|------
Node2 |   X   |       |
------|-------|-------|------
Node3 |       |   X   |   X
------|-------|-------|------
Node4 |       |       | 
------|-------|-------|------
Node5 |   X   |   X   |   X

Obviously, I do not want to maintain this table manually, but be built depending on the actual dynamic content of the site.

I have the following problem I can't figure out how to solve - note I am a Drupal newbie...

I have two content types; TypeA and TypeB. TypeA includes an entity reference field of TypeB to create a static relationship, similar to a "related work" or "is part of" use case.

This relationship displays fine in the full display mode for TypeA and all is well on that front.

I fail, however, to display this relationship as a mapping table in a third content type, where all TypeB nodes represents columns, and all TypeA nodes are displayed in individual rows like the following example:

Example:

Consider we have the following three nodes of TypeB: NodeA, NodeB, and NodeC.

We also have 5 nodes of TypeA, all along with the following relationships to TypeB nodes as follows:

  • Node1 (NodeA, NodeC)
  • Node2 (NodeA)
  • Node3 (NodeB, NodeC)
  • Node4 ()
  • Node5 (NodeA, NodeB, NodeC)

The mapping table then would look like this:

      | NodeA | NodeB | NodeC
------|-------|-------|------
Node1 |   X   |       |   X
------|-------|-------|------
Node2 |   X   |       |
------|-------|-------|------
Node3 |       |   X   |   X
------|-------|-------|------
Node4 |       |       | 
------|-------|-------|------
Node5 |   X   |   X   |   X

Obviously, I do not want to maintain this table manually, but be built depending on the actual dynamic content of the site.

EDIT

The following constraints also apply (forgot to mention them in the first place):

  • When I unpublish or delete a node of content type TypeB, the entire column of this mapping table needs to disappear
  • The view (anticipating that I can implement this through crafty Views configuration) should not be cached, or cache-cleared upon change (is that even possible?)
  • The "X" in the example table would ideally be replaceable with other code or content I control (e.g. a little image, or glyph or so)

Thanks a lot,

Michel

Source Link
MDr
  • 17
  • 7

Display content referring other content in a mapping table

I have the following problem I can't figure out how to solve - note I am a Drupal newbie...

I have two content types; TypeA and TypeB. TypeA includes an entity reference field of TypeB to create a static relationship, similar to a "related work" or "is part of" use case.

This relationship displays fine in the full display mode for TypeA and all is well on that front.

I fail, however, to display this relationship as a mapping table in a third content type, where all TypeB nodes represents columns, and all TypeA nodes are displayed in individual rows like the following example:

Example:

Consider we have the following three nodes of TypeB: NodeA, NodeB, and NodeC.

We also have 5 nodes of TypeA, all along with the following relationships to TypeB nodes as follows:

  • Node1 (NodeA, NodeC)
  • Node2 (NodeA)
  • Node3 (NodeB, NodeC)
  • Node4 ()
  • Node5 (NodeA, NodeB, NodeC)

The mapping table then would look like this:

      | NodeA | NodeB | NodeC
------|-------|-------|------
Node1 |   X   |       |   X
------|-------|-------|------
Node2 |   X   |       |
------|-------|-------|------
Node3 |       |   X   |   X
------|-------|-------|------
Node4 |       |       | 
------|-------|-------|------
Node5 |   X   |   X   |   X

Obviously, I do not want to maintain this table manually, but be built depending on the actual dynamic content of the site.