0

I've got a main website where it's possible to create and change menu items and I need to share this menu with other websites and programmatically(once per week or once per day) the other websites will import and override the menu.

This is very useful when a company has got more websites and wants to use the same footer menu for all its websites.

Do I need to use just Feeds and Rules to achieve it? Is it possible to achieve it without adding the main website db menu in settings.php in all the other websites?

Thanks in advance

1 Answer 1

1

I think the idea of using a feed is an attractive one. I don't think there's any way to push a menu definition out as a feed using existing modules, though.

I'd write a very simple module to provide a single callback that would fetch the menu definition and theme it as xml or json (easier). That could then be fetched at intervals by your other sites.

3
  • Yes, is it possible to create a menu view with json format? Commented Mar 18, 2013 at 16:21
  • 1
    Yes, something like print json_encode(menu_tree('my_menu')) would be the simplest code to do it. Commented Mar 18, 2013 at 19:39
  • It looks interesting. I will test it in these days. Thanks Alfred. Commented Mar 19, 2013 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.