Closed marcomessa closed 1 month ago
@marcomessa what about adding a second param to the setTemplatesPath
like:
Configuration::make($twig)
->setTemplatesPath('mynamespace.myplugin::components', hint: true) // default false
->useCustomTags()
->setup();
Also, could you add a small test?
Sure! I'll update this pr as it's done!
Hello @giorgiopogliani, are the modifications and tests ok? Do I need to edit something else?
Hello there, thank you for your great work. In order to use this extension with OctoberCMS / WinterCMS, I need to update how the component path is generated. This CMS load twig always with .htm extension and using a hint path style.
Es.
can be references as "mynamespace.myplugin::components.button". Not using this syntax cause the CMS's custom twig loader to fail. With this PR I add a basicu support for using hint paths, using this syntax:
Let me know if you like the idea and if you want to change something! Cheers!