symfony-cmf / menu-bundle

Extends the KnpMenuBundle to work with PHPCR ODM
https://cmf.symfony.com
32 stars 48 forks source link

[MenuExtension] Embedded multilang menus #106

Open dantleech opened 11 years ago

dantleech commented 11 years ago

Originally reported by @wjzijderveld in ContentBundle

The embedded route and menu forms for the content admin are great!

But for multilang menu nodes, it doesn't work to well. It only shows one node, even though I have already a menunode in 3 locales (with fixtures in this case).

I'll try to look into it myself if I find the time, but wanted to have a reference over here.

This is now a problem for MenuBundle as the admin logic has moved into the Extension.

Global issue: https://github.com/symfony-cmf/CoreBundle/issues/81

dbu commented 10 years ago

i guess the problem is that admin extensions are not applied to admin extensions. so we would need to add the locale to this admin again.

what we do in our project is simply to inherit the locale of the content to the locale of the menu items in the sonata preUpdate and prePersist methods. but for this, the admin has to be aware of what it is embedding...

(actually we do not even use the locale dropdown at all but rather use the request locale, as we found this is less confusing for our editors.)

dbu commented 10 years ago

the approach with using a form for admin extension is working nicely in the seo bundle. however, i did not manage to use the form to edit the document itself so we maybe gain nothing with this.