studioespresso / craft-navigate

Navigate makes adding and maintaining menu's and navigations a breeze. Set what types of links a menu may contain, make multi-level navigations, built-in active-state check, custom classes per item.
https://plugins.craftcms.com/navigate
Other
26 stars 7 forks source link

Question: write content migrations #55

Closed jan-dh closed 3 years ago

jan-dh commented 3 years ago

Was wondering if you 'd have an example laying around for content migration for a navigation.

janhenckens commented 3 years ago

Hey Jan,

Have a look at this migration that is included for upgrades from Craft 2 sites with AmNav:

Here we create a navigation: https://github.com/studioespresso/craft3-navigate/blob/master/src/migrations/upgrades/amNav.php#L27, and here we add the nodes https://github.com/studioespresso/craft3-navigate/blob/master/src/migrations/upgrades/amNav.php#L63

Happy to write out a more specific example if you have a little more information.

jan-dh commented 3 years ago

This is perfect

janhenckens commented 3 years ago

Cheers! Feel free to chat me if you think I can help out :)