Open vladotesanovic opened 9 years ago
Hi there, This is an extension for Twig that lets you use Joomla Frameworks' Language package (Text class to be specific, this package is very similar to CMS JLanguage and JText). So, it's not for Joomla CMS, but for Joomla Framework (see http://framework.joomla.org/ and https://github.com/joomla/joomla-framework/). Maybe the repository name is kinda misleading.
While the plan is to rewrite the CMS around version 4 to be based on the Framework, this seems to be complex task and there are few conceptual issues being discussed (https://github.com/joomla-cms/start-here).
As for the CMS templates in Twig, Twig renderer would need to be implemented in the template itself. When I look at the _JDocumentHTML::loadTemplate, there are no hooks, just output buffering. Twig Renderer would need to be called in each file that's being required by the core (like HTML overrides).
yes, I understand.
What I did: I created new View class that extend JViewLegacy, but in display method it implement your Twig exension.
Instead of extending JViewLegacy i extend MyTwigView and in view component/view/myview/twig/ i store all twig templates.
No problem so far.
What's the problem then?
There is no problem,
Thanks for building this extension.
My problem was to implement this in current Joomla installation ( 3.3 ).
What I did ( just to get it work ): \joomla\language\src\Language.php
in __construct() functio Before everything.
in loadLanguage() function