Changing old menu to global (losing data)

General discussions about WebYep
Post Reply
DesignNorth
Rank 2
Rank 2
Posts: 57
Joined: Mon Apr 23, 2007 4:49 pm

Changing old menu to global (losing data)

Post by DesignNorth » Fri Oct 28, 2011 4:08 pm

I'm upgrading and old web site.

And the WebYep menu needs to appear globally on all pages. If I change the menu to true (rather than false)

<?php webyep_menu("Product List", true, "products.php", "_self", "", ""); // WebYepV1 ?>

I loose the links to the old data in the data folder.

If there a way to retain the old data? (by changing something in the data folder)?

marcus
Objective Development
Objective Development
Posts: 170
Joined: Tue Nov 30, 2010 1:25 pm

Re: Changing old menu to global (losing data)

Post by marcus » Fri Oct 28, 2011 5:34 pm

DesignNorth wrote:If there a way to retain the old data? (by changing something in the data folder)?

Yes there is a way to do this:
  1. Open your documents file (/webyep-system/data/documents) and find the line that contains the name of the php page where this menu appears. Note the number next to the page name. This is the document ID.
  2. In your data folder (/webyep-system/data) find the file named #-mu-MenuName, where # is above mentioned document ID and MenuName the name you have assigned to this menu.
  3. So if your menu is named "Product List" and the document ID is 13, then you'd have to rename the file 13-mu-Product_List to mu-Product_List.
Now you can change the menu's global flag to true and use this element on every page without losing content.

Caution: Make sure you have an up to date backup of your data folder before you begin! This way you can start over if something goes wrong.

Post Reply