Is it possible to create a multidimensional tableselect (table with checkboxes)? Why? I would like to show a tableselect of all menu links to delete one or more but a nested tableselect.

So if they want to delete a link, all child-links will be selected to. I know i can just delete all children with a query, but for the user I want to visualise which part of the tree will be deleted.

Output ex.: => CB = checkbox

  • CB link1
    • CB link 2
    • CB link 3
      • CB link 4
    • CB link 5
  • CB link 6
  • CB link 7
    • CB link 8

... and so on.

  • Yes it's possible, no Drupal doesn't have anything like that built in - so you'd need to implement something custom – Clive Apr 16 '14 at 8:13
  • how do you mean ? => i'm a little new in module development – TLammar Apr 16 '14 at 8:20
  • I mean Drupal has a table select element built in, but it's one-dimensional, so it won't work for your purposes. You could look at extending that element, or use the code for it as a starting point for your own. It's not a small task though, probably better to break it down into the individual development elements (once you've decided what those are) and ask questions about those. Or maybe there's a module already, but in not familiar with one – Clive Apr 16 '14 at 8:23
  • ow, yes i knew that. I just wasn't sure it was possible to make it multidimensional. Thanks for the answer – TLammar Apr 16 '14 at 8:26

If you are looking to delete children as well with parent menu items seems like Delete menu options address this issue..

Project page says

On the 'Delete menu item' confirmation page you can choose to delete child menu items and decide if the linking nodes should be deleted as well. When the checkbox 'Delete all children of this menu.' is checked, all child menu items of the parent menu item to delete, will be deleted as well. When the checkbox 'Delete nodes of the deleted menu items (only orphaned nodes).' is checked, the nodes to which the child menu items link will be deleted too. When other menu items link to same nodes or aliases as the nodes which were set out to be deleted, those nodes will not be deleted.

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.