Loading...
 
Features / Usability

Features / Usability


Re: Duplicating menus

posts: 4656 Japan

There's no admin interface way to do this as far as I know.

I haven't tried this in a while but assume it is still possible. First, create a new menu, to get its Id number. Then access your Tiki's database with phpMyAdmin and dump (export) a copy of the tiki_menu_items table (that's the name, or something like it). Each row of the table, so each line of the text file in the dump, is a menu item. At this point you might want to make a copy of this file as a backup in case there are errors in the editing.

Find the items of the menu that you want to duplicate and copy them, then paste them back into the file following the last existing item. You then need to change the menu Id, for each of the pasted-in rows, from the original to the Id of the new menu that you just made. Also, each menu item has a unique Id number, so you'll need to find the highest Id number of the existing menu items and assign the next integer to the first item of your added menu, and similarly edit the copy and pasted menu items' Id numbers in order, so in the end all the items have Id numbers that are unique and increment upward.

This should do the job, but, as I mentioned, keep an unedited copy of the menu items table file just in case you need to revert to the original if editing goes wrong.

Actually you can do the modification of the new menu by editing this file also, if you recognize the pattern of the data for each item and just change what needs to be changed for the new menu items.

Then submit the table again using phpMyAdmin (it will drop the existing table and replace it with your edited file).

About your second question, I'm not sure if it's possible to prevent registered users from seeing menu items (regardless of type) that are visible to anonymous. Maybe somebody else has an idea about this.

-- Gary

There are no comments at this time.