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.)
Related
I'm going to create a theme and I would like to create a functionality that I have seen in other themes that I have used: for example every page can be created with different modules in different order (videos, images, texts, etc...) so its up to the person creating the page to decide which elements are going to be used.
What is the best way to achieve this? I have created custom templates but I have never tried to separate the content with modules, my first guess is that it can be done using WPBakery or a similar plugin because that is what I have seen in the themes I have bought but I'm wondering if that's the best option. Do you have any recommendations or maybe a tutorial where I can see how I can accomplish this?
Thank you.
Use Advanced Custom Fields plugin and create a field with multiple possible elements. So you decide how elements will look like and the client can build his own site with that modules. The chance the client will break the layout because of superfancy layout builder is nearly zero.
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
is it possible to force the children of a defined page type always to show as list?
And if yes, who? Can't figure out who to do this.
Thank you in advance
it is possible, however its pretty trick to get it working properly.
It is not only a lot of work to get it done right, it will also bring certain problems with it which you will have to overcome (eg the Preview Split Screen will not work, you will have to apply some custom javascript I think), so consider this carefully.
Have a look at the silverstripe-blogger module, micmania1 has done a pretty good job there.
He uses a GridField to display the blog children (BlogPosts) if you set the config like this:
BlogPost:
show_in_sitetree: false
you can find the module on Packagist and GitHub
Am I able to add the following field to a content type, so that each piece of content I create can be conditioned to a page?
Or is there a module to extend Publishing Options, where by it adds all the pages I have created (just like 'Promote to Front Page')?
If not, why is no one doing this? As a new user to Drupal this seems like it would be a handy operation. (I have already tried this module but it doesn't achieve the results I'm after).
If none of these solutions are available, what would be the best alternative way of doing this?
I've posted this question on Stack Exchange for Drupal but I need a quick answer and there seems to be a bigger community here :D
You should use Context. With Context, you'll be able to manage contextual conditions and reactions for your drupal like Regions.
Have you used Views? it is one of the most common used drupal modules. It doesn't extend publishing options directly but it does replace it in a way. You can say by example put a list of al content-types: your_own_Content_type that have the publishing options of promoted to front-page. then sort them by title, date, what ever you like.
you could also create only one view and create multiple blocks out of it. you have to understand the logic of drupal: if you want different blocks on different pages, you have to create the different pages AND different blocks
create the view for one type of content-type and make one block out of it. put this block on the desired page. All your other blocks are made with the same view, just adjust a condition in your view and create a new block out of it. You should also put all your blocks in the same region, and set the to the right pages
here you can find a lot of documentation if you run into any problems... drupal.org/project/views
Views is the best at creating a slideshow of images or any type of data on your site.
Used in combination with nodequeue it might offer near or the full functionality you are trying to achieve (check this out ... and this too) - but I don't understand your question entirely.
By my opinion Views is too complicated task for much simple request.
There is a few ideas for solution:
Easy way - You can create a specific template file or add some if statments to the node.tpl.php(specific tpl better)
For minor changes - Create a new context with "path" filter and "theme html" reaction, than hide the field by the css
Best but complicated(large usages) - create a new "view mode" and implement the display by new "hook_menu".
~ Almog
I have been looking all over for this, but so far without any luck. Is there a way to have comments per field instead of per node in drupal? If there are no modules available for this, do you think it would be hard to implement?
I thought I could make a "pseudo-content-type" with views that's nothing more than several content types displayed one on top of the other, so you could comment any of them. But then I don't know a way of making the user create all those content types at once.
The built-in comment module is not going to do comments per field on a node. I've been drupaling for almost three years and I don't know of any module that allows comments per field.
It is possible to do, but it would take a custom module and plenty of slick programming to get it to work. As far as difficulty I think an intermediate PHP developer with some knowledge of Drupal should be able to whip this out.
A kind of quick solution would be using panel module; form all your commentable content in nodes ad put them together all into a panel. This is kind a quick and static solution, possibly with views one can make it more custom.