0

It seems that there is no module in the contribution repository which simulates the behaviour like this of terms in given vocabulary or menu items in a given menu from system modules in Drupal 7. (?) Wouldn't it be an interesting use-case to achieve something like entity trees simultaniously this way, like a task and sub task management, with a given weight and relation to each other to build parent and subordinary relations between them? I know about many reference and relation modules and asked already some specific questions about them and their limits here but I can't find an entry point where I could start to contribute on this special scenario. I can easely drag and drop taxonomy terms or menu items and give them an "order" and sub "order" in their hierarchy already from core and the system "knows" about this order. Not only of one level, also for more levels. It is not visually only. So I can build paths based on that relations. It seems that this is not possible to make with entities and any reference or relation modules out there ? Am I right or is my question asked the wrong way around?

1

Couldn't you do this with the Relation module, views and Rules?

  • Thx for chiming in, tenken :-) Hello from Berlin. I have 2 sandbox D7.28 stages local set up here: one with the complete set of entity_refence & additional modules, and the other with relation, relation_add and some. In both cases I would need 2 fields on each side of the connection to encounter the level of sub and parent, but in both cases this relation is not known from the whole system. If course, I can create views lists, etc., but I can't ask the lowest entity which entity sits on top of the relation tree, when you don't know how much levels the tree will have in future. Or am I wrong? – nilsun May 29 '14 at 1:13
  • Nothing can find the "lowest entity" unless you code your own business logic lookup. Relation supports querying-through-relations so you should be able to create a parent lookup function yourself. If you used Taxonomy as an example you could find the parents of taxonomy terms using the taxonomy api. The building blocks are there -- you need to write your own module(s) to bring all these supporting datastructures to behave as you want. – tenken May 29 '14 at 5:21
  • Well, relation seems to support reverse check and I am even possible to let the reverse check proove if forward relation already exist on both ends. This way I can at least "fake" a one level parent/sub relation to the frontend. With this in mind it is even possible to have step by step hierarchies, but they are anounym I guess. Let me take a look how deep I can get in these relations with views queries... – nilsun May 29 '14 at 11:13
  • with relation at least they had issues with bigggg relations in number of fields and also depth, see this issue and the linked relation at the bottom: drupal.org/node/1649398 i'd guess you could have almost depth of 99+ and have no issues ... – tenken May 29 '14 at 12:38
  • thank you @tenken for your support on this! very helpful informations. best regards. – nilsun Jun 2 '14 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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