First off I'd like to say that I can really appreciate where the devs on this are coming from and thank you for your efforts. With that said I wanted to ask why twig is the templating engine in use here? As a vanilla Laravel user, I for one am most accustomed to and comfortable with using blade syntax in my projects.
Having built October on top of Laravel and then moving the templates to Twig, to me, seems to go against the basic principle upon which Laravel and October were designed for which was to make app development easier on the developers, right? Would there be an option ever to use blade again? I have no interest in using Twig and even less of an interest learning a new templating engine, something I feel should be optional.
I know this is beta software so I wanted to put this out there. Thanks
+1 for blade support
i think developers used TWIG instead blade because twig most popular then blade , and this is concept of this cms
Blade would definetly be nice, though :) I find it confusing for example, that partials use .htm. Doesn't make sense, as they clearly aren't pure HTML most of the time. Blades .blade.php makes more sense, don't you think?
As a laravel developer I would like blade too, but as a theme developer it would be confusing which templating engine to use and how will my user know which theme is using his templating engine. [Edit] I just realized the question was meant for the core team, not the average developer. :D . . . . oops sorry
At a base level all templating languages are the same. Twig is a mature and robust templating language that is easy to learn. It also has Twig.js which can be used for client side rendering.
We could debate about the differences of Twig and Blade until the cows come home, at the end of the day, we went with Twig because it was a better candidate for October. It is important that a single templating language is used on the front-end, otherwise Themes and Plugins would not be compatible with each other.
Thanks for the feedback and I can understand the reasoning for implementing it, Im just curious as to how easy/hard/impossible it would be to put blade back or have it as a configurable option? I can also understand about themes compatibility but plugins/extensions really shouldn't be dependent on the templating engine and if they are, they are not being built correctly imho.
I myself am more familiar with blade. Just getting the hang of Twig though. I guess it won't matter all that much when you get used to it.
As a designer i think Twig is like daftspunk already said more mature and is largely known and supported by it's community. But as i said i'm not really a developer but a designer that fell in love with octoberCMS, because it's clean, easy to understand and it doesn't come with a load of un-needed plugins and modules. Keep it up and keep the CMS clean and simple.
1+ blade. I respect the fact that they implement Twig as an templating engine but as a Laravel framework lover I'm just to used to the beautiful syntax of the incredible Blade Templating Engine. In fact, that's one of the best choises i beleive Tailor Otwell made. Other question: Are you planning to upgrade October CMS to version 4.3 or 5.0 ?
Twig is far more powerful than Blade and what a lot of non-laravel people are used to. And breaking themes and plugins by changing template engine at this stage would probably not benefit the ecosystem.
Keep up the good work guys devs, I love how developer-centric OctoberCMS is!
Twig is easy as Blade. I don't think that the decision should consider minor issues like file extension or because Laravel uses Blade.
Which template decision should be around:
- Cleaner syntax (1st)
- Power and Flexibility (2nd and important as first)
- Compatibility or Portability
- Community support
My tough about this "Twig vs Blade" is that both are clean, powerful and easy to learn, so I don't care which one. Personally I use Blade (standalone) for all my projects except in October CMS. Learning Twig with a cheatseet takes 20 mins, but I know it can take some more in the practice: http://willthemoor.github.io/Twig-Cheat-Sheet/
I don't know why the developers have chosen Laravel without Blade as an option, when Blade is good as Twig.
Twig is awesome. I steed with zero knowledge of twig when I migrated my sites to October but it makes my life much easier. Im happy enough without blade support tbh. Twig can be learned by any php dev in under a day and the documentation is fairly solid.
I love Twig. Coming from Shopify theme development and being well versed in Liquid, Twig takes 0 effort since the syntax and functionality is largely identical.
Would be nice to have an option to use either twig or blade though. Since October is powered by laravel, it is odd not seeing a blade anywhere.
I know that October can be forked to use blade on the front-end and the backend for database control. It just means there is no user editable layouts or cms pages, since it is all done using routes and blades static nature.