1

As related to a previous question i asked, and got an answer to, i'm posting this question to further enhance the usability of the answer, the question was how to automatically generate the twig templates under the global folder app/Resources/views/home/home.html.twig while using php app/console generate:controller command. i got a workable answer to this, which is entering the path to the global app folder like so

Templatename (optional) [AppBundle:Post:get.html.twig]: ::../../../../app/Resources/views/Post/get.html.twig

The thing is the generated template still has the {% extends "::base.html.twig" %} clause with double colon for the AppBundle location, and also typing out the long sting path with the ../../.. would be too painful to do repeatedly.

Im pondering if there is a solution to actually override the console command itself to accommodate this? symfony 3 automatically generates base templates under the global folder and the best practice for symfony 2 is to have templates inside the global folder, i don;t know why the creators have not updated this.

There will be a bounty for quality answers on this question a friend has agreed to do so since i do not have enough reputation.

0

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.