I'm learning Symfony2 and I'm trying to "cover" all featured that may be needed for making web site/application. Menus are one of them. So I've installed Symfony2 and Sonata admin bundle.
On the Net I've found that "Knp Menu Bundle" is the most used menu bundle for Symfony2. However, by reading it's documentation I've discovered that it provides only functionality for rendering menu and defining menu items from code. Coming from CMS world this solution looks only partial to me.
What's the best solution for having standard menu functionality, like in CMSes (WordPress, Drupal, name it)? The solution that will allow admin to edit menu tree "visual way" from back-end, re-arrange menu items with drag & drop and similar standard features for any modern CMS. The solution that will work with Sonata or some other admin bundle.
The closest answer I've found so far can be seen at:
http://www.codeproject.com/Tips/418196/Editing-Tree-Structures-in-Symfony
It uses "Nested tree" Doctrinte extension and it give one solution how nested tree structures like menus can be handled from Sonata admin. Too bad there is no better (out of box) solution for such a common thing as Menu tree.
Related
I'm learning Symfony2 and I'm trying
to find a solution for my problem ,
What's the best solution for having standard menu functionality, like in CMSes (WordPress, Drupal, )? The solution that will allow admin to edit the menu and adding images , articles , alerts .. from the back end and push it to the front end ,
The solution that will work with Sonata or some other admin bundle.
I'd say the KNP menu bundle is the closest you will get to a general purpose menu builder, it's what is already used in Sonata Admin if memory serves correct.
You'd still need to cookup an admin for the definitions and compiler for generating the menu's however.
The short answer is that, if you are needing menu builders in your solution, Symfony might not be the best bit of code to build on. Look up Symfony Content Management Framework if you're determined to use Symfony
Symfony is about putting together a custom solution
I'm having a hard time getting to grips with menus when using the Internationalisation (i18n) suite for Drupal 7.
I have two languages set up for the site I'm working on - English and Welsh.
In the Multilingual Options for Main Menu, I've set it to Translate and Localise.
This appears to be fine, but creating the Welsh versions of pages creates nodes that themselves are not linked to the menu, so when they're displayed on the front-end, the menu structure is lost.
However if you do create a menu link for the translated page, you create a new menu item that essentially doubles up the menu size.
Which method is one meant to use? Do you have one menu structure per language and therefore try and work the code displaying the menus to only show the current language or can you somehow let Drupal know that English page N and Welsh page Y both attach to the same menu item?
As ever, any and all assistance given is greatly appreciated.
~Matt
Your best help will come from the drupal docs.
There are a few ways to setup multilingual websites and it wouldn't be possible to cover it all here.
https://drupal.org/node/275705
Follow the above tutorial as you will need to install quite a few modules. My guess is you may have to revisit your Drupal structure before being able to solve your issue.
I've had to work on a lot of French/English websites and the best thing I find is having separate menus for each language. Then use blocks to show your menus using the Language visibility settings. One better is to use the Menu Block module.
With this method you can end up having a lot of menus (as each menu needs to be duplicated per language). However I find content editors can much better grasp this separation, over the confusion of mixing menu items from different languages in the same menu.
I have forms generated with generate:doctrine:crud, they work perfectly, but do not look very nice.
While looking for something different I found Sonata Admin module.
It is really cool with different features, buttons and a very nice layout.
My question is, how can I apply it to my existing forms?
Can they be created automatically just as generate:doctrine:crud does?
What I understood is that I must create all the forms again, manually using Sonata Methods.
Soanata Admin is backoffice generator. It's useful to fastly create administration pages and as you said, it uses its own system of Form generation.
What you like in Sonata design is the use of Twitter Bootstrap that is a frontend framework (CSS+JavaScript). You can use it in your own project, without using Sonata.
By overriding native Symfony form rendering with Bootstrap controls elements, you will render nice looking forms too !
I have created a site which has some roles. and each user can have some roles. every role has permission to some pages.
I want to build menus dynamically depending on user roles so every user can see his available pages in his menu.
I want to know that what is the best way to do this? using an XML to describe this menus hierarchy and specify each role available menus or there is better way to do this?
Rather than reinventing the wheel, I'd strongly suggest using Telerik's Extensions for ASP.NET MVC.
It includes a powerful Menu extension and has good programmability. I've used the .Visible() method along with IPrincipal.IsInRole() to determine which menus are available and when.
What's better is that it's free and open source! There's a paid-for version with support, but community and forum support seems to be quite good enough.
we have a mysql database that has the roles and objects and a decision is made at run time based on the logon user as to who gets to see what. There is also a decision made on individual pieces or controls on the page. There can also be tests on the pages themselves to make sure it's not just a menu that's hiding a page.
I used the MVC sitemap project in combination with a "Security Trimming" link helper ( "Security aware" action link? ) for this sort of thing before. Pretty easy.
I am new to drupal so forgive me. I made a menu and it was automatically created as a DHTML menu. I wanted to style the menu myself and just simply want the 'ul.menu' tree to be printed. Instead, it's doing some javascript and unnecessary CSS. can i disable DHTML menu for this particular menu?
thanks!
If you are using DHTML Menus module, and are asking how to disable it for certain menus, then it should be possible via the configuration in Administrator > Site Configuration > DHTML Menus (as suggested by this and this discussion). Looks like they had this feature in v2.2, then lost after switch to 3.x, and re-included around 3.2 or so.
But you didn't specify whether you use this module or not, so my answer may be completely off due to lack of information.