FOSUserBundle: trying to override layout.html.twig - symfony

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

Related

Woocommerce overridden not work after Administrator logged in

I've copied the folder plugin/woocommerce/template to theme/mytheme/woocommerceand designed a new template and just checked Woocommerce/System Status to make sure overridden is worked.
The template works fine but when the user or the admin logged in , the overridden code does not work and the template defaults to plugin/woocommerce/template and shows the default template
the problem happened for this particular pages:
Product-single.php
taxonomy-product_cat.php
archive-product.php
And this problem happen just when Administrator logged in
How can this problem be addressed?
I Also Disable All plugin (except woocommerce), copy original woocommerce template file to twentysixteen Template and modify that.
But The Problem not Solved Anyway!
I use woocommerce 2.5.5 And Wordpress 4.4.2

Sonata SEO Bundle Site MAP

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.

Overriding teplates in FOSUserBundle

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

Dashboard template Sonata Admin Bundle weird

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

Route generation or chooser in tinymce bundle with symfony2

I'm working on sample application written with symfony2 and I want to add some cms funcionality (standard manage page entities) and the problem is routing in tinymce wysiwyg editor for links. It will be nice if user will be able to choose route to symfony application page when it want's to add link in the content. Is there a solution / plugin for that problem?
I don't know of a route exposing bundle with a plugin for TinyMCE but you can easily write one yourself with:
FOSJSRoutingBundle
For security reasons not all routes will be exposed by default.
After installing the bundle as described in the README. Expose routes like this:
my_route_to_expose:
pattern: /foo/{id}/bar
defaults: { _controller: HelloBundle:Hello:index }
options:
expose: true

Resources