Sunday, 15 April 2012

templates - Overriding the FOS UserBundle in Symfony2 (also using Fr3d ldap bundle) -



templates - Overriding the FOS UserBundle in Symfony2 (also using Fr3d ldap bundle) -

because override templates of fos userbundle in symfony2, trying adapt custom userbundle.

i made templates (and followed exact same construction fos bundle) , i've made "empty" extension every controller.

however, create override active, clear cache , effort login, there error , don't understand why. error reads:

an exception has been thrown during rendering of template ("route "login" not exist.") in "fosuserbundle:security:login.html.twig".

this own securitycontroller example:

<?php namespace r\bundle\userbundle\controller; utilize symfony\component\httpfoundation\redirectresponse; utilize fos\userbundle\controller\securitycontroller basecontroller; class securitycontroller extends basecontroller { }

by activating override (before clearing cache), mean uncommenting line:

<?php namespace r\bundle\userbundle; utilize symfony\component\httpkernel\bundle\bundle; class ruserbundle extends bundle { public function getparent() { homecoming 'fosuserbundle'; <-- line activates or deactivates override } }

the login.html.twig template in own userbundle, supposed override 1 in fos userbundle, still exact re-create of original 1 (which functions fine if override not active).

i assume somehow need override routing files well, if re-create them custom userbundle error remains.

the login route not included. need include it, see step 6:

class="lang-yml prettyprint-override"># app/config/routing.yml fos_user_security: resource: "@fosuserbundle/resources/config/routing/security.xml"

templates authentication symfony2 twig fosuserbundle

No comments:

Post a Comment