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
Related
I'm working for a project where the menu bar needs to be a dynamic menu interacting with the roles defined for the users. It works with the Symfony 3.3.
The concept should be like this: '1' user have 'n' roles and each role should see 'm' options in the menu bar. And also, different roles can have the same option menu available. So the result shouldn't show the same option twice.
I've been exploring the different kinds of menus in the list of bundles availables and no one seems to match to this idea.
I know how to do it by myself but I wonder if anyone knows if exist any bundle who have this functionality or very similar to be able to use it or modify it easily to be able to use it.
The one I saw but it's not all I need is the most used for menus but I don't think can manage the role concept. If I'm wrong tell me plx.
What you suggest to do?
Thank you very much for your help!
Follow this symfony documentation knpMenuBundle
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.
Is it possible to obtain menu items from multiple bundles with the KnpMenuBundle?
As for now I've been working with the service but that's overwritten if you declare it in multiple bundles. I read something about the custom providers https://github.com/KnpLabs/KnpMenuBundle/blob/master/Resources/doc/custom_provider.md but I'm not quite sure if that is what I'm looking for.
Just to sketch the / a situation: 2 bundles with their own menu items which need to be loaded in the same menu.
I facing the same problem. After reading in in that matter i guess using events is the way to go.
see http://symfony.com/doc/current/bundles/KnpMenuBundle/events.html for detail information.
(sorry, way to much information to provide it directly in the answer.)
I am basically a Java/Oracle guy. I was told that it is possible to build any simple Web app with Wordpress.
I successfully installed Wordpress on my machine and am trying to create a text book app. For this purpose, it is an employee database, with fields Name, Address, Department, Designation. I need to have the usual create/edit/search/delete functionality.
The problem with Wordpress is, I really don't know where to start, or how to customize pages.
Am I barking up the wrong tree? Is Wordpress more for blogging/news style websites than for traditional database applications? If not, how do I customize Wordpress to create the application described above?
Thanking you in advance.
Viability
Wordpress is a great system for many different applications, not just blogging/news style websites.
There are many articles out there that go in to great depth on this, but here is a good one right of: http://torquemag.io/app-dev/
Getting Started
As with any project, there clearly is more than one way to skin this cat, but right off, here are some basics I'd recommend you check out about customizing your Wordpress install:
How to create a child theme: http://codex.wordpress.org/Child_Themes
How to create a page template: http://codex.wordpress.org/Page_Templates
How to develop a plugin: http://codex.wordpress.org/Writing_a_Plugin
Plugins
In addition to this, i'd highly recommend a few plugins, which will help make things easy for you:
Advanced Custom Fields
•Makes it really easy to add Custom Fields, to allow you to store custom information, associated with a post, page, taxonomy, user etc. really easy to use, has great documentation and support, as well as a really nice UI. I'd also recommend paying the 25 bucks for the repeater field, which is really useful.
Custom Post Type UI
•Easy way to add custom post types to your wordpress instal, the default post types are: posts, links, pages. With this plugin you can add custom post types for things like say, employees.
Conclusion
In conclusion, I don't think you're barking up the wrong tree, I think that wordpress can be a simple elegant solution for a web application, and can easily be molded into almost anything you can come up with.
For developed such kinds of application you need to develop a wordpress plugins. You can handle any kinds of database operation there. You can add create/edit/search/delete functionality
(I've posted this on the drupal forum too btw)
I'm converting the company websites to use Drupal, or at least trying to check that its going to be the best way forward. I have a background in PHP development, and I'm currently using the CakePHP framwork. I've built this site (not my design) and I can see how to replicate most of the functionality using Drupal, most likely using the CCK module.
http://preview.tinyurl.com/yk6u8mt
As you can see from the homepage:
A user chooses a country.
The country is passed using an ajax call to a script that decides which phone is best based on 'in country' network coverage.
A div is shown recommending the visitor the best phone for that country.
I'm wondering how to go about this in Drupal, I'm definitely not after a step by step guide, I just want to know if this kind of thing is possible with Drupal, and what approach to use.
If someone can help that would be superb. Thanks.
Okay, so you've got a path you're defining in hook_menu, which is where your form is being presented - or else you've got it set up as a webform in a node, that could work too.
Either way, in your form you're going to be using AHAH - check out http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#ahah and http://drupal.org/node/348475 .
Basically, you're going to define another path in hook_menu that's of type MENU_CALLBACK, and which will receive the country as input, and then will return the div that you'll display on the screen.
One core example of AHAH that may be useful to you is where you're entering a password and it lets you know if the password is secure enough - check that out.
Edit: There's also some good examples at http://drupal.org/project/examples.
I would look into using CCK and views. you can set up filters for the views. If filters don't work, you have the ability to include php code. I have also successfully added jquery code in the header of a view through which I was then able to have my view filtered by what is typed in a text box.
Coming from CakePHP using Drupal is a pain in the a** - even more for developers.
It's application structure might be designed to ease extensibility but this only means you have a system to enable your own plugins and themes.
While modules are basically the M+C-part the themes are the V-part of an MVC-application. The problem is that this seperation is not very strict in Drupal - in fact you have to break it sometimes in order to make things work (e.g. you have to include a theme_mymodule_myfunction() into your module as default output which you then can override with your theme using mytheme_mymodule_myfunction() ) And don't even bother looking for classes ( see http://drupal.org/node/547518 ).
Also there is no real link from a module to a theme. On many occations this is a good thing as you can switch modules and themes seperatly without creating a problem. For application builders coming from CakePHP (or any other framework) you often feel a lack of "wholesomeness" - you create parts for a base software and have to live with it's drawbacks.
IMHO I wouldn't recommend this step. Drupal is fine if you have to manage a website and might add a few modules to add neccessary value (image gallery etc.) but I definetly don't recommend it as a base for a customized web-app.