Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
include_once is a crutch for users who don't know what is being called where.
The existence of this feature could still be justified in the days when there was no autoload, and the application could consist of several independent third-party modules.
But right now there is no reason to use _once.
The structure of the template should be meaningful and logical. So that everything that should be shown is called exactly where it is needed, and in a single instance.
Everything that is missing in a twig is written through extensions to it. If you have symphony, then it is in the dock if you find the section with AbstractExtension.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question