Menu with categories from external file

are there any good examples on how to create a menu which gets the menu points from an external source? i’m not a native english speaker - hope you understand what i mean.

preferably with submenu points… (drop down or hierarchial)

thanks in advance