Running php 8.2.11, apache 2.4.51, mysql 5.7.36 on Windows 10.
Installation went fine and I noticed there is no theme folder under catalog>view like there is in version 1.5.6.4 just javascript, stylesheets and templates.
Inside the template folder are folders similar to 1.5.6.4 theme folder, but inside the files are twig instead of tpl.
Found a link to twig and read through it but will have to read it over again as it was a bit confusing.
Mind you php is not my strong suit either. Css no problem though.
Opened the twig files and it looks like an advanced version of html. Is that correct?
When I customize the example theme will it function like a child theme whereas I won't have to worry about core updates causing issues with my changes?
Will I have to occasionally tweak the example theme or does it primarily use the default theme functions etc similar to wordpress? And I should be able to leave it alone unless I want to make more changes?
Thanks for your time.
Sorry for the noob questions but just wanted to clarify before starting to make changes.
To quote from Daniel Kerr (the author and owner of the OpenCart project):
Symfony Twig was inspired by the Python Django Template Language.FYI all the Twig lovers out there!
The Twig syntax is good, but the implementation and the available methods is a joke!
All the Symfony developer has done is create a garbage frame work putting 3rd party scripts into DI containers.
The Twig syntax he ripped off from Jinja and Django templates then did a garbage implementation!
The fact that this system cache is just compiling php into more php code instead of html is a disgrace!
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
JNeuhoff, thanks for the reply. I read that during my research and wondered why the owner of open cart would use it if he didn't like it. I liked the old tpl system.JNeuhoff wrote: ↑Tue Oct 24, 2023 4:54 pmTwig is just another example of re-inventing the wheel.
To quote from Daniel Kerr (the author and owner of the OpenCart project):
Symfony Twig was inspired by the Python Django Template Language.FYI all the Twig lovers out there!
The Twig syntax is good, but the implementation and the available methods is a joke!
All the Symfony developer has done is create a garbage frame work putting 3rd party scripts into DI containers.
The Twig syntax he ripped off from Jinja and Django templates then did a garbage implementation!
The fact that this system cache is just compiling php into more php code instead of html is a disgrace!
Still playing around with the default (example) theme css files and the site is starting to look like my old one more and more.
Thanks for the djangoproject link, I'll give it a read to see if it helps me make sense of twig.
Twig is a newer templating engine that was introduced in Drupal 8. It is a compiled template engine, which means that it converts template files into PHP code before they are executed. This makes Twig templates faster and more secure than TPL templates.
@nootkan you may wana read more about here
Twig documentation: https://twig.symfony.com/doc/
Twig on Drupal.org: https://www.drupal.org/docs/develop/the ... -in-drupal
Just to make it simple
Twig templates can be reused.
Twig templates can be cached.
Twig templates can be secured.
Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature
Symfony Twig is a collection of at least 174 PHP class files at my last count. Twig templates aren't cached, the resulting PHP code is. It's not faster than PHP templates!
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
You're right about the internal workings of Twig; it indeed compiles templates into PHP code for execution, leading to caching of the PHP code rather than the templates themselves. While raw PHP templates might be faster in execution due to no templating overhead, Twig offers substantial benefits. Its automatic escaping enhances security, its syntax promotes cleaner code, and it overall boosts developer productivity. The performance gap narrows significantly when Twig’s caching capabilities are considered, making it a preferred choice for many developers.
Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature
A good template engine can be beneficial for a MVC framework, Symfony Twig doesn't cut it!
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
May be some alternative , could be use but its allot of work to push those changes into git repo.
Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature
It's probably easier to add support for some other template engines, which 3rd party authors or theme designers can optionally use, like we did for the OpenCart Template Switcher.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
khnaz35, thanks for the links will try to get to them for a read when I can free up some time.@nootkan you may wana read more about here
Twig documentation: https://twig.symfony.com/doc/
Twig on Drupal.org: https://www.drupal.org/docs/develop/the ... -in-drupal
Users browsing this forum: No registered users and 10 guests