By daniorama on
Hello, has anyone found a way (or made a contrib module) to clone menus or menu items? I use the same Menu Items in different Menus and it would be nice to make this faster. I know that there are some topics about this issue but neither gives a solution. Thanks
Comments
Command line menu management
I'm just completing a Perl script which makes changes to the menu_lists table that might help. This allows me to create 100 menu items at a go from an ASCII file, which IMHO is way easier to configure than using the extremely slow Javascript interface. It's not ready for public distribution, but if this sounds useful, drop me an Email at tpg@hps.com. Here's a very short description of what it does.
~> ./drupal-menus.pl
drupal-menus.pl [options] export createfile
drupal-menus.pl [options] -summary export createfile
drupal-menus.pl [options] rename NAME|mlid=N to NEWNAME
drupal-menus.pl [options] delete NAME|mlid=N
drupal-menus.pl [options] -title 'MyMenu' -path 'node/22' create
drupal-menus.pl [options] -plid 345 -title 'MyMenu' -path 'node/22' add
drupal-menus.pl [options] makemenus my.menus
Version 1.3
Help manage menus for Drupal 6.x.
More details available by entering: perldoc ./drupal-menus.pl
Sounds really cool!
Sounds really cool! My only concerns with this approach are about the active and expand options and what will happen if the path doesn't exist (right now menus in Drupal don't allow to add a path if doesn't exist)
A really good option would be to also allow to edit existent menus. Do you think that could be? Thanks!
I have just sent you an Email.
http://drupal.org/project/men
http://drupal.org/project/menu_block may be useful.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
Can you explain us how can
Can you explain us how can this modulo clone Menus items? Has it any hidden option? Because I've read the desciption and even installed it, but I see nothing at all regarding this issue... Thanks
You're right, it doesn't let
You're right, it doesn't let you clone menu items as such, but if I'm not mistaken it does let you stick an existing menu tree (or fragment of a tree) in a block without having to duplicate the tree. Might give you another way of doing what you want ... or not!
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
mmm... maybe. I will play a
mmm... maybe. I will play a little with the script of tgliedt and with Menu block and I'll post my conclussions as soon as I can, so I hope this thread will help anyone with the same problem. Thanks to both of you :)