I need to override default profile show templaets. I copy directory from FOS bundle to my UserBundle, but i didnt see any results? What i am doing wrong?
That's now how template overriding works. You need to copy them into your app/Resources/ directory. This means to override templates from FOSUserBundle you'd copy them to app/Resources/FOSUserBundle/view/[template].html.twig and then customize as needed
Related
I want to change the output template or extend the template of the Text and Video plugins that are some of the generic Django CMS plugins.
how to do it?
Plugins use the Django template engine, this allows you to override any template at the project level.
So if the text plugin looks for a template in cms/plugins/text.html, you can override this template by adding cms/plugins/text.html in a folder that is on your TEMPLATES directory.
There is a plugin that has all of its presentation functions declared so that they can be overriden. I.e.:
if (!function_exists('show_thing')){ ... }
How should this be done? I tried declaring the function in my themes functions.php but it was already declared by that point of execution.
If I create my own plugin with the method declarations then how can I ensure my plugin loads before this plugin does and functions are definitely overriden?
The easiest way to do this would be to use a Must Use Plugin. Create a folder called /wp-content/mu-plugins. Any PHP file in this directory will be loaded (they do not have to be activated) and will be executed before the activated plugins or your theme files (including functions.php). Use a file here to define the functions that you want to override from the plugin.
Check out this diagram for more info on the WP Core load order: https://wordpress.stackexchange.com/a/26622/20880
I am using sonata seo bundle and knp paginator bundle.
My Question is When I added new custom static url like :-(www.symfony.in/blog)
in our KNP Menu.It's added successfully. But When I run the :-
php app/console sonata:seo:sitemap --scheme=http web www.symfony.in --env=prod
Command execute successfully But in sitemap Blog url(www.symfony.in/blog) not added.
Any one know how to add custom url in Sonata SEO Bundle in Sitemap ?
I am google it but nothing found !
Thnaks!
You need to create a SitemapIterator in order to add your custom URLs to the Sitemap, as described in the documentation. This is an Iterator that you will have to declare as a service, and then reference into the sonata_seo.sitemap.services configuration.
Im trying to override the layout.html.twig of FOSUserBundle.
So I have my new layout.html.twig at app/Resources/FOSUserBundle/views/layout.html.twig but it is not used..
I have tried also at app/Resources/FOSUserBundle/Resources/views/layout.html.twig but it is not used either..
I have also cleared my cache
The original one is at: vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Resources/views
These are the instructions I followed: https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/overriding_templates.md
My dashboard in Sonata Admin is completely weird.
I've removed the bundle from vendors and web.
Update with composer (all dev-versions of sonata) and clear the cache.
Still weird.
erro http://img21.imageshack.us/img21/246/qgy8.png
There has been an udpdate in the block_admin_list.html.twig in sonata admin bundle. See this commit
If you want to go back to the previous template, download this version of block_admin_list.html.twig and put this file in you app/Resources/view.
Now update your config.yml to change the list_block template :
sonata_admin:
# your config
# ...
templates:
list_block: ::block_admin_list.html.twig
I add the same bug yesterday and this workaround works fine.
Hope this helps