 Okay, good good evening everyone and thanks for coming to this session about tweak and Drupal Let me first obviously introduce myself. My name is Javier. I work for this company called sensual apps Which is the company that created both symphony and tweak and many other open source projects Which obviously are the main new technologies behind Drupal 8? About this talk we won't talk about tweak basics Okay, and we won't either talk about all the low-level technical details of everything We're going to show but don't worry because the tweak documentation is really excellent So all the details are there so you won't get close on in real life. Okay Okay, group and tweak To it has a lot of great features. That's why you can use choose to use this To begin template engine like secure fast easy to learn But to me the main the best feature of of tweak is that it's very consistent in two ways The first one is that tweak defines a very very small set of features. So it's really easy to learn There are people concerned about hey I know PHP and now I need to learn a new type plate engine and okay It's going to be very very easy to learn. Okay, don't worry and Even if it's a very small set of features is enough to create any kind of template of any level of complexity Okay, and the syntax is very consistent since they want it hasn't changed in in any way Even if they are key and adding new features continuously. It hasn't changed Okay So that's why I think using tweak templates is the decision Drupal ever made. I know that it sounds like wow, but I'm really Confident about this However, if you see all the tweak features, which are a lot Drupal 8 at least the built-in themes Only use like the 30% or less of the tick features Okay I'm very disappointed looking at the built-in templates so far They are not really using all the great features of tweak and it's sad because Drupal is great tweak is great If both work together they could do really amazing things So we're going to see several things related to tweak a lot of features. So We don't have many times. So let's start With the first block which is accessing variables, okay For each block on the first slide will be this one. Why is this important? Why do you have to know this in this case? You can improve the Application performance a lot if you do this, okay If you want to output a simple variable like this one, this is a real example from real Drupal 8 template Okay, you output a simple variable nothing Nothing strange happens. It doesn't output the value on that's that's all But if you output a complex variable, which is which are these ones which contains that dot Here the tweak magic happens When you put this in a template tweak tries to do all of these to get the real value So links could be a key of a content array Or it could be a method or a property or a getter or a iser Okay, tweak tries all of these in this order and the first one that exists is Using the template. Okay, so it's great for the template. You don't have to change the template if the application change but obviously Regarding performance this has some impact, okay So especially for Drupal, I mean your Templates are going to be very complex. We are going to access a lot of variables. So these matters this Performance penalty. So to provide a solution for this is a PHP extension Which it doesn't really do anything else but resolving The variable logic, okay all these resolving magic stuff is done in the PHP extension So you can get just by installing the PHP extension Just a at least 15% performance increase in your website or your application Okay, so you should really install this PHP extension And the last thing about variables is that some of the Drupal variables are Wrongly named like the markup here if you put that tweak is not going to work Okay, because of that character. So you you've seen a lot of Drupal templates this alternative way of Doing things. Okay, but the natural thing is using the dot that's the way to do Sometimes you can do that in Drupal. Okay, defensive programming. This block is about is about Since sooner or later errors will happen in your application in your website What really matters is what you do with that error happens. How do you recover from that situation? Okay, so we're going to see several techniques deep spreex First one is dealing with empty or undefined variables. There are a lot of different ways of dealing with this I recommend using these two methods the first one If and the name of the variable Checks if the variable is not known. Okay, not empty for any for a string or a ring not empty and no zero for numbers However, because because it only works if the variable is defined If that variable doesn't exist in the template, you're going to get an error Okay, in the second case this one the default filter. This is always going to work It doesn't matter if the variable is empty. It doesn't exist. It's not defined. It doesn't matter. It's always going to work Okay, so you can combine both like this and this is always going to work no matter what about the the variable And in case you don't know if a variable is defined or not in Drupal 8 this problem should not happen That's why I put that in the slide But just in case if you need to check if the variable really exists or not you should use this check Okay, if variable is defined Of course, there are other specific checks like it's null. It's empty or whatever Okay, second technique for empty collections you have an empty array of elements You can take care of that With this one which obviously in regular PHP. It doesn't exist But here in twig you can use the four L's Which is really really convenient and you can even filter Run elements or elements you don't want to fill to output in the loop with the if close So in PHP you have the four for each do while whatever here You only have the four but you have the four else and the four if else Now avoiding missing templates when you use they include Instruction to include any fragment of twig This is usually going to work. I mean, this is a regular template It's probably defined in your theme the menu dot twig template. So this is gonna work always However, if you do this If you try to include dynamic template This is probably in some cases not going to work because that name is dynamic is variable So probably the template the final template doesn't exist sometimes Okay, so there are two ways to avoid these problems the first one in the include instruction You can provide a collection of templates And they act as fallback Twig tries to load the first one if it doesn't exist try the second one the third one And obviously if none of these exist an error happens. Okay, but The first one that exists is included Okay The other technique Sometimes you cannot really provide fallback templates. Okay, so you can instead of Letting that error happening and the user getting a bad experience seeing an error or in your work on your website You can ignore the missing template. Maybe the user see a blank Section section in the web page or something like that, but it's better than an actual error So you can do this You can tell to it. Hey, if this template doesn't exist ignore the error. Don't include anything Okay, don't trigger an error. Okay now Filters, this is the list of filters defined by Drupal 8 so far. It's not released yet So we we don't really know the final list, but so far This is the the list of filters provided by by Drupal. However Being such a complex project and long-standing project is going to be alive for years Drupal Probably they add and remove some of these filters The problem is that if they remove the filter your Your themes your templates will break. So recently To it has added this new feature when you create a filter you can define your own filters for your own themes You can say hey this filter is now deprecated and the new one you should use instead of this one is Another one. Okay, this is the way to do those breaks in your Applications and in your things. Okay. This is the right way to do things In some applications like symphony these kind of Errors are logged and you can see the message you are using a deprecated filter Please update it as soon as possible and blah blah blah in Drupal still you don't have this information Okay, but probably when through police finally released you will get this log information also, okay? But for now you can see this information Okay, and this Check also important if you use a lot of blocks and you do advanced stuff with your templates You can check if something is a block or not if it's defined as a block or not but This is for a Tweet version which hasn't been released yet case for the next version of to it. This will be a Important because Drupal uses a lot of blocks In the templates, okay quite spaces in this block first. I'm going to say to tell you Please don't care about what the spaces and in the second part I'm going to say hey, please care about what these spaces in some cases. Okay, so First I want you to save time. Okay, this is a tip from being Having by having made the templates for few years with to it Okay, so this is a trick from from experience. Okay, so if you have the following in a quick template the output Obviously will be this one. Okay, obviously because you don't are using you are really not using any tweak feature case pure HTML code But if you do this The output won't be the same you take a look It looks like it's the same but the output will be this one Why because in the tweak template there are these white spaces which are this one This is the green one and this is the orange one. Okay, the problem is the orange space White space which breaks the alignment of the HTML templates That that's the problem Into it. Obviously you can fix this with two alternatives with the spaceless or with the dash To attack, okay But my recommendation is please don't waste your time with this Trying to fix the HTML white spaces and alignment Please don't waste your time Okay, tweak templates should be readable HTML should not I mean you are working with a true templates every day Every single day. That's what you're working on The HTML is going to be sent to the browser minimize compress and it's going to be a mess So don't care about the HTML alignment and weight space and things like that. It's not worth it However, sometimes you need to add I think you need to add some weight spaces Here for example in this real through palette template in my opinion, it has a minor problem, which is this one as You can see the HTML contents and the tweak contents. They are not separated by a white space. They are absolutely close Why do they do this? Obviously because when title attribute is empty the generated HTML, which is the second one is Absolute perfect HTML code and in the first case, obviously it's also correct My recommendation is to always separate HTML and tweak code with a weight space And I know that if title attribute is empty you will end up with a weight space with an extra weight space My recommendation it does not matter at all This is valid HTML valid code. It works perfectly and the tweak template is more readable with that weight space And this case is even more clear again a real through palette template And I think this is a real bad practice As you can see as always the HTML the generated HTML is perfect in both cases if height name exists or not but Here are very very serious problems First you are hiding HTML things like the class attribute inside tweak strings This is very easy to overlook and to make mistakes. This is the first bad practice and the second one is this one Because we want perfect HTML we are doing weird things with the white spaces in tweak This means that if you remove accidentally that weight space All the page design is going to break and you're going to spend several hours trying to see what the problem is And what the CSS and things like that is not working. It's because of that if you remove that weight space You break everything. So I recommend you to do like that This is the in my opinion the best way to do this Obviously when height name doesn't exist you end up with an empty class attribute Which again? It doesn't matter. It works. It's valid. You can check with the official HTML validator. It's absolute valid code So please don't mess with white space in tweak in HTML set. Don't waste your time with this, okay Okay, the next block Hopefully we'll save you a lot of time while developing your template your themes, etc And the first thing I want to tell you is about the tweak configuration This file site slash default slash service dot yml is the way is the place where you can define the tweak behavior in Drupal You can change three things We only care right now about this one debug You said it to true by default is false But you said it to true Drupal is going to add a lot of debug information in the generated HTML Let's see an example. This is the real HTML generated by Drupal by default if you change nothing But if you set debug to true you get this See the difference in the same code But you have a lot more comments which are these ones for each block for its piece of a theme of Template use by by Drupal. You're going to see all the full list of Templates that Drupal tried to load before loading the real template use in that page Okay, so you know exactly which template you should define to override that design of that block of that page of that thing It's very very easy to know what to do with template to create or modify Another thing that is very important while developing themes is to know which variables which information is available in your theme in your pages in your files, okay one great thing that Drupal does is to as you can see add a lot of comments Describing all the variables pass to a template. This is so you always know which variables are in the template, okay, however, if you want a more dynamic way of doing things you can use this special function called dump and If you put that in any template You get this all the variables under contents Available in that template all the information all the variables obviously this is too much Doing the dump Like that so probably you need this dump only the variables you are interested on so if you put Several names you only get those variables Which is much better obviously while debugging and developing the themes the templates, okay As always remember that whenever you change the both the templates and the configuration like the tweak configuration You have to reveal your cache. I I you probably Do it in your own way, but I can recommend you this project Drupal console Which is a great way of controlling your Drupal websites and applications Be at the common console. Okay, so to rebuild the cache for any project You just have to execute this Drupal cache rebuild or the shortcut and that's all Okay, okay, the next block is about escaping Which is very important for secure to avoid security related issues. Okay however before starting Be careful because the Rupa has to replace the default tweak escaping filter and behavior With their own so I don't know if when Drupal is finally released will be the same but for now This is true One of the best things of twig compared with other Temperature engines that it always escapes by default the contents before displaying them Okay, so you have some HTML content inside of a screen and you try to output that screen Maybe you expect it to work it like that But it does not it works like this HTML content is not rendered is displayed as it is Okay by default obviously you can use the raw filter when you are sure that you want to Output HTML you can use that filter to render the real contents. Okay That's obvious to documentation space well However, when you have this Some values some variables on contents inside not HTML, but JavaScript a URL and HTML attribute for instance when you have that you may have problems You're generating an entire JavaScript file with tweak tweak is is smart enough to know that you are using JavaScript And so it doesn't scape like HTML it escapes contents for JavaScript But if you are using like this putting some JavaScript inside HTML Escaping may be wrong Okay, so you can use this filter the e for escape obviously to escape a playing different strategies For instance, I want to escape this value for Including it in a URL it will be the first case all for including it in a JavaScript code Okay, there are several strategies or explaining the documentation obviously, okay, but you should be aware of this Okay, to it does does it the right mostly? But probably you need to tweak some things when doing advanced things like JavaScript and stuff like that. Yeah sorry, okay, I they are talking about filtering and Filters I guess I guess for Drupal 7 version you you mean Okay, it had something like that Okay, but in this case that they are using their own filter called Drupal escape Which do some changes and at the end it uses the tweak one So probably when this release by real the droop a late final version probably they won't use their own Escape filter, but the real one there the tweak the two one you mean the scaping filter or in general the escaping filter you cannot really configure them because I Mean if you want to escape for HTML you cannot configure which character are problematic or not for HTML I mean that's defined and it's like that you cannot really change it doesn't make sense for the spec escape filter for others obviously, yes You can add new escape filters if you need another encoding for whatever Format you are using but these are the they built in the default ones Okay about reducing templates This is obviously going to save you a lot of time and a lot of code and your themes are going to be great if they Reduce a lot of contents, okay? As always there are a lot of different ways of reducing templates and fragments of templates This is probably How often are they used? Okay, I Mean for real web for common web applications. I don't know when Drupal is released. This is What is going to be okay? so we're going to do a quick recap of each one and Recommend you when and when not to use each of them. Okay extends It's very common for websites to share a lot of elements between pages I mean the header the footer the menu the sidebar the main style the CSS That is the JavaScript library is a lot of different elements are exactly the same for all the pages like these ones for the official Drupal code web page all the pages are the same contents obviously changed but All the other things are exactly the same for a page. So quick stops this problem like this He says hey, you can define a complex complete Template with all the common elements header footer menu sidebar, whatever and then all the pages that are exactly like that Can define only the contents only the things that are different from from the layout template for the big complex template Okay, and it's really really easy to do that The layout is a regular HTML and tweak template so you can use everything obviously and the others in the only thing you have to do is this one You need to define blocks which is like holes with which other templates can fill with their contents So you say I open opening a hole for the title because the title will be different from one page One other obviously and for the main body content I'm going to open another hole which other templates will fill in with their contents and it's like that The children templates the templates that use that layout that extends from the layout They only have to define the contents for those holes for those blocks So you don't have to repeat everything for every page for every template Okay, so this obviously is really Use a lot to create the layout of the themes of the websites obviously Okay, and you can also extend in several levels Okay, you only you don't have to have only one layout and then regular pages You can have one base layout then two or three main layouts for different sections and then pages and case very very cool Okay, they include function This is as easy as it looks You have some code that you are using in a lot of templates Well extract that fragment of code no matter how short or long is it extract and save it in another file and then include that file in the templates and that's all as easy as it looks Okay, so to reuse large large fragments like sidebars and things like that is really cool. They include function Macro this is not really Use a lot and it's a shame because you could really save a lot of time and a lot of code if you use this, right? For instance, if you define complex forms, you probably are using this html code and tweak code okay to output All the values set it up for each for few okay This is for the bootstrap CSS framework, but all the other framers are similar. Okay with a with a macro you could do this See it's almost the same the code is exactly the same But you wrap the code with the macro function, okay, and it's like a PHP function you pass some arguments and then function return something in this case it renders the Internal code that you define there. Okay, so now forms can be as easy as this one You can say macro from field and then only the different things between The only strange things in this case is this one import self as macro You have to import macros before using them even if they are defined in the template you are using Okay, it's a bit strange, but it's useful because macros can be defined in a different template Maybe you use a lot of macros well create one tweak file to store all those macros and then import Those macros in your templates. Okay, that's the idea Okay, now the embed again is not used a lot, but it's really really useful especially for Modern websites, which are all of them based on a grid like the bootstrap grid, okay And as you can see for instance in these two pages Use the same three column grid for that row obviously Then one uses the two column grid and the other one again the three column grid But at that both at that point both templates are using exactly the same structure. It's exactly the same grid Okay, and you may think well with the include function, maybe I can solve this problem I mean you create the grid in some file you include it and that's You can't do this because when you include something you include both the structure the HTML tags and things like that And the content of that template you cannot change the content. So obviously this doesn't work You may say hmm, okay include now, but maybe extends I can create a base template and then extend from it and It doesn't really work if your pages are very complex and if they use a lot of grids in a single page three column and then a two column and then no columns and In that case it doesn't work because you cannot extend at the same time from different pages. You cannot do this So the right solution to this problem is this one You define the code again, this is for bootstrap, but it could be whatever For the three column grid And you define three call three blocks, which are the holes which someone has to fill in with contents You define three blocks for the columns and then whenever you need a three column grid You only need to do this. See embed is not include is not extends is something different It's like a combination of both it includes something that I can change their contents before including them so it's really advanced for Grids especially which are as I said very very popular nowadays And the set which is almost the last one is really easy to use it But it's not that common For instance, imagine that in your page you use the you display the navigation two times at the top of a listing and at the end of that listing Instead of repeating that code in two different parts of the same template. You can do this You can Enclose the common HTML code with a set instruction and that creates a variable called like that in this case Navigation and the content of that variable would be all the code enclosed by set and Then you can output like a real like a regular variable. You can output that code as many times as you want So it's not that used but it's very useful for cases like this And the last one is the juice tag, which is really advanced for us for Drupal things So I'm not going to explain it at all. Okay, you can See it as always in the documentation. Okay, but forget for now about this Okay, dynamic templates, this is something that you usually don't use for Normal websites normal applications, but since Drupal is so advanced and you can do so many great things Probably sometimes you may need to do this That's the reason why we see this Okay The first thing about dynamic templates, you can use that function called template front string to do exactly What it looks it creates a real template from the string code that you pass to it So you create some string with tweak code inside and you can create can create on the fly That template and obviously you can include it or do whatever you do with a real template And it even works on extents and bed and everything So this is really really advanced You can do it all in one step like that include template from screen and whatever and Obviously since is a regular stream You can manipulate it before creating the template you can replace things or do whatever you do But with the strings So this is really really advanced and someone related to To this function will be this one Source which gets the source code of the given template without actually rendering it So you can get the source of any template manipulate it and create on the fly the template and include it again and I Know this is not common This is something that you usually don't do but again Drupal is very advanced you have very advanced needs So here the tools that we provide to you Okay, a problem with that site Customization, I mean in this case you have a website with some header footer sidebar, whatever and you let some sections to Customize overwrite some content and design of some parts of that page Like for instance reddit reddit a lot of Reddit can change the contents and the design of the sidebar Header, etc Okay, you can do this in using tweak obviously it's very very easy to do but the problem is that when you are Rendering templates provided by the user that's probably a problem a security issue Why because even if you restrict the the kind of people who can actually create those templates Maybe a special set of editors or publishers or special set of users Even in that case you cannot really trust anything done by users Okay, the template on purpose or not can break everything and it can be a real disaster Okay, so tweak provides this cool thing which is the sandbox Which is a way to Run templates usually made by the users but in a safe way You can be sure that the application is not going to break or there's there's not going to be security issues and things like that Okay, and it's done like this You can sandbox a template with the tag or the argument Okay, and that template in this case sidebar.tweak cannot use all the features available in tweak That template can only use the ones that you define here These are the details that we don't explain. Okay, but you define a white list of methods tags Filters properties that the the sandboxes sandboxes template can access and anything that is not here Won't be available to that template. Okay, so it's a very secure way of including Dynamic things or contents done by users that you can strictly control what they can and cannot do in your application Okay, this is a very short blog, but it's I love it because Working with dates with dates is not that easy sometimes and tweak already provides a lot of features So you can do a lot of things in tweak and forget about PHP Okay Like for instance something like this displaying dates in the time zone of the user. It's as easy as it looks You don't have to transform dates in the PHP code or do whatever you do It's as easy as this Or doing dynamic Comparisons of dates you can say hey if the event hasn't started is unlike this You can buy tickets if not you cannot keep buying tickets You can do this in the template and when they when the data writes that link won't be displayed again So you don't have to do strange things in PHP or things like that. Okay, the template can take care of that And I love this example the date modify filter you can do amazing things like this See you can say hey the early birds ends 15 days before the event start You can display that date like that. You don't have to clone the daytime object in PHP and modify and You can do you can do it like that as easy as as it looks Okay, and to end this session. I'm going to do a quick recap of Some of other tweak features that in my opinion put twig years ahead of PHP Some of them are really really small. Okay Like this one for instance, I know it's very small But it's very very convenient for collection and a race to get the last Element of a collection is like that last Obviously, but in PHP you cannot do this Okay, or this one. I love it this this test it starts with ends with matches the The template that the play code is very very expressive And is great and this is something that you cannot do with PHP in a lot of programming languages You have this starts with and ends with function, but it's not available in PHP In fact, it is rejected by PHP. They propose to add this and they say hey, no we don't like this or this one the in operator. I love it is Multipurpose operator. Okay, you can check if some stream is inside is contained in some of a stream Or if some item variable string whatever is containing some collection Again, this was proposed to PHP But rejected by PHP internals. They say no we don't like the in operator It's sad because it's very very expressive way of doing things in templates And this one name You have this filter they convert encoding filter You have two parameters. It's a filter to convert one encoding to another but my question is Which one is the original? Charged and what and which one is the target one? You don't really know You should check the documentation or the source code is the usual needle haystack haystack problem You don't really know which is the the order Intuit you don't have this problem because all the attributes all the arguments all the parameters of the all the filters and functions Have a name So you can use tweak like that This works perfectly But you can put the name of the argument of the parameter when you use that parameter when you pass that value So now it's clearly which one is the origin chart set and which one is the target is obviously And obviously because you are using the name You can put Those parameters in any order you can skip any of them. You can do great things that obviously in PHP. You cannot Okay This has been proposed several times for PHP, but we'll see in a few years. Maybe they add this feature Okay, and it's great when a function a filter in a function in this case has a lot of arguments because for instance In the first one if you want to change the fourth argument, which is called ignore missing You have to define the first three arguments But in tweak you can do what you see at the at the bottom You can just define the argument you need in this case ignore missing so you can avoid Setting an empty second parameter and empty third parameter Another quick and cool thing about tweak is this one Imagine you have a image gallery very common and you have several rows and each row displays three images Well the HTML code will be something like that again for boost drafts And maybe if you are used to the PHP way of doing things Maybe you do it like this, which is not bad at all I mean with the cool divisible by filter and all of that, but this is a bit ugly code It's the PHP way of doing things you can do it like that in tweak Which is Using the batch filter you see you say tweak. Okay. I have a collection of items I want you to give them to me In groups of three or four or five or two or whatever then tweak gives you a Super collection of three elements and you can do whatever you want with those three elements So it's super clean and easy to understand code Again, you cannot do this easily at least with PHP Another thing another cool thing the short tenary operator if you do this in PHP As you know you should probably know You get an error. This is wrong. This is this doesn't work in tweak You can do this and obviously it works. Okay, so you have again this example setting a class attribute Both work, but I obviously recommend the first one is more readable most short more easy to understand and obviously it works in tweak not in PHP and Almost the last one This cool filter a which combines several PHP functions and which led to Extract elements from a collection or character from stream Very easy as you can see in these examples You can say it's like a sub stream well done and a ray slice well done Okay, it's very very easy and very cool and very easy to understand and to read and to write and to learn This way of doing things. Okay, again, this is available in lots of programming languages like Python for instance But in PHP you cannot do this. It doesn't work and this one probably for each For loop that you use in a template or in the code you would also define an eye variable Temporary variable to get the number the item number and things like that in tweak This is already done for you inside a for loop. You have this special magic variable called loop With all the usual things you need for instance, give me the number of the item Loop dot index stores that information and it starts with the number one which the way humans count But if you want the matching way of counting things you have the index zero and so this is already done for you use it and that's it and This one the the last thing about arguments We said that you can use name arguments with twig which is great Especially when a fight a filter defines a lot of attributes and keeps adding more and more attributes Okay, you can do like this So for tweak it doesn't really matter how many attributes you define and if you add new ones It doesn't matter the template is going to be still cool But for PHP, this is the real PHP code you need to define this filter It's going to be more and more and more complex if you keep adding arguments well You can do is you can do this in recent tweak versions You can do this define a filter as variadic, which means I Don't mind how many attributes how many arguments are you going to pass me any number is okay? Zero or infinite. I don't care all of them are going to be stored in some variable in this case called options And you can access all of them like that that can rate So it doesn't matter how many arguments you define or how many you add or remove everything is gonna work This Thankfully is already available in PHP in PHP 7. I mean not in the current one Okay, but this variadic thing is the new way of doing things in PHP and including you can use it today Okay So to sum up In my opinion using two 10 places the decision Drupal ever made Okay, I don't know if you agree after this session But what I think you agree is that two templates are safe modern consistent beautiful and Obviously Drupal 8 templates are that too, okay? So they are already a lot of great Drupal 8 things Already done and available to use and I'm sure you are going to do great things with with 3 if you use all the feature that it has So thank you And you have any question you can say it aloud and I repeat or you can use the microphone out there Any question or comment or whatever You tease this at the start of the presentation with the thought that Drupal 8 is only using like 30% of the power of tweak. Can you Tell us what it is that that you would love to see in Drupal 8.1 or where we're a Sort of hundred percent usage of twig the main things and In fact, I would like to see everything used by Drupal because the current in place if you take a look at them they are only using like the if close to to say to see if some variable is defined or not and the way of outputting variables like The simple way of outputting variables they apply some filter sometimes But they don't really use any filter from twig. They don't use any advanced embed thing for instance to create reads and things like that the extents is also not used they use include but nothing else So I really cannot describe all the things that I would like to see because they are almost everything that I Show in this presentation. I mean they are really not using almost anything Okay, thank you. It's really sad. Okay We have another question there about that Which is the level that twig template I Mean the level of functionality that we should use there because you say Drupal uses only if and other easy tasks Which is the highest level we could use on a on a twig template without Having performance issues and sets regarding performance issues apart from the PHP extension which can really improve the The performance all twig templates are cash and transform into PHP code into raw PHP code before executing them. So All the overhead of using and not pure PHP to define the templates is gone Because everything is transformed automatically to PHP. So Obviously the overhead is going to be more than zero. I mean using raw PHP is better for performance But this is very very small performance impact for For two templates, I mean, I don't know for Drupal but for my from my experience from symphony There are huge websites with hundreds of millions of Users and a lot of traffic and everything works right with twig. I mean, it's not incredibly slow Or it's not the problem to it for for huge symphony applications. It's not the problem So you can really use any advanced feature safely It won't break your your application. It won't make it very slow at all and something else different And about Angular and other languages, which is the best practice here to escape brackets and other things Okay, you can define in in twig The brackets that they use to output things or to do things or to common things. They are all configurable I don't know in Drupal Which file you have to change to configure that but you can change the syntax of twig instead of the double Coulee brace, you can use brackets or parentheses or whatever you want to use for twig So it doesn't clash with angular gs, which is more straight and you can change angular So you can change the syntax Obviously don't do it in regular cases, but in these cases with angular it may make sense Okay, any other comment or question? Okay, so thank you again