Okay. Welcome everyone. So, this session is about twig. I'm not going to talk about twig in two technical terms, really. What I want to do today is talking more about the philosophy behind twig, and I want to emphasize one big feature of twig, which is how you can organize your templates. But first, I also want to talk about why you need a templating engine in the first place and which problems we are trying to solve with a templating system, and why web designers should embrace a templating system like twig. Okay, so this quote comes from a blog post I wrote back in 2009 when I started to work on twig. It was the first time I was talking about twig in public, and at that time people were very scary about the idea of using a templating system in PHP, probably because in all the major frameworks, the templating system used by this framework was actually plain PHP. So, a very long time ago, SMARTU was really popular, but at that time, in 2007, 2009, people were sure that the best templating system was PHP and that you don't really need another one. And even if I was really convinced that using a templating system like twig was really a good idea even for frameworks like symphony, I thought it would be quite impossible to convince the PHP world that using twig was actually a good idea. And, of course, I was wrong because three years later, twig is used by many people. So, the first stable version of twig was released in March 2011, two years after the announcements of the twig project, so it took a long time to get there. But we took the time because even if the project is really active, we had almost 40 releases since then, so 18 months and 36 releases, that's a lot, but zero backward compatibility breaks. So, even if we had 36 versions, we did not break backward compatibility a single time. And that's something I'm really proud of and we try very hard to not break backward compatibility. That's true for twig, the language itself, so the thing that you are using to create a template, but that's also true for the PHP side of things. And today I'm not going to talk about the PHP side of things, I'm really just going to talk about PHP, the templating system, the templating language, really. So, we have about 140 different contributors for the core. And since the, so I'm not sure you are familiar with packages, packages is the website where you can get stuff that are instatable via Composer, Composer being the package management system that is going to be used by Drupal version 8. And packages started a year and a half ago and during that period of time, twig was downloaded more than 1.5 million times. So, that's a lot really and we were actually the first project to hit 1 million downloads on packages. So, if you want to get more information about twig, you can get on the official website, twig.sensualabs.org website. We have a bunch of documentation. That's also why I'm not going to talk about all the details of twig because you can get the documentation pretty easily and I think everything is well documented. And if you want to contribute, that's really easy. This is the GitHub account where you can go. You can fork the project. You can contribute documentation. That's always nice to have web designers only people trying to fix the documentation because obviously I'm not a web designer, I'm a developer. Sometimes I explain things from the developer point of view and the web designer point of view can be quite different. So, I'm always looking for more people contributing to the docs and tweaking things. And if you just want to send some love to the twig project, you can start the project also. So, when we are talking about terminating system, we are talking about HTML websites, but not only HTML websites. We are talking about things that are displayed to the user or that we send to the user. So, it can be a web page, of course. It can be an RSS feed, it can be an API, an XML API, it can be emails. So, that's not just about HTML. And twig does not solve only the HTML problem, the terminating system for HTML. It tries to solve the problem at another level, really. Here, this is a very simple example. An email I received some time ago. It's about a license from ZenServer. And as you can see, the email is probably the same for all the people buying the ZenServer stuff. It's more than the same for everyone, but some parts are customized based on the recipient. So, if the email was just about static content, then we would not need to use a terminating system. We need a terminating system because we have some placeholders, really. So, some stuff that are different based on the recipient of the email. So, if we were to use PHP for this email, this is how you would add, change the placeholder and replace the placeholder with the value of the username here. So, as you can see, this is quite verbose. And if you know nothing about PHP, that's probably just a lot of random characters, really. Why on earth do I need to put all these random characters to make it work? It does not make any sense, really. So, it's error-prone because you need to remember the exact syntax you need to use and you need to use these syntax every time you need to output something. You need to replace a placeholder value whenever you need to inject the content. So, it does not really make sense. It's not web designer friendly, really. And actually, you can explain why it is done this way. But then you need to understand PHP or you need really to understand XML, really, because this is really an XML notation, right? And here we are in a text email. So, it does not really make sense to use an XML notation in an email, which is just plain text, right? But this is the PHP way. So, PHP was created a long time ago as a templating system for HTML and probably just HTML. It was not really created for anything else. And if you have a look at the evolution of PHP in the last five years, you can probably understand that PHP did not evolve as a templating system. It evolved as a language, a programming language, actually. If you have a look at the new stuff in PHP 5.3, 5.4, 5.5, I think you can find just one thing that makes PHP a better templating system. So, that's why I think that PHP is not a templating system anymore. It's not the best way to create your templates. And even if you can use it as a templating system, it's just plain ugly. Yeah. So, actually, there was one thing. I think it was in PHP 5.4 where you can actually remove the PHP error. So, that's a bit better. I'm not going to explain why it was not the case before and now. You can't do that. But still, it's just about a lot of different randoms character. So, wouldn't it be better to replace those random characters with something shorter? And as you can see, it's just about random characters again. But at least it is shorter, easier to understand, consistent. And that's tweak. So, in tweak, when you see double braces like this, it means it says to tweak output what we have in between. So, here, you want to output the name of the user. So, this is a convention. And as you will see later on, we have few conventions in tweak. But even if you can think that those double braces are random characters, actually, the syntax is not really random because tweak, the tweak syntax, is actually used and shared with many other PHP projects. So, Drupal being one of them, Drupal version 8, but as you can see on the screen, there are many other PHP projects that are actually using the exact same syntax because they're using tweak. And even if you're not using PHP, if you are using Python or Ruby or JavaScript, you can find similar templating system with the exact same syntax, which means that if you are going to learn tweak, you will be able to reuse the same syntax, your new knowledge in Python, in Ruby, and in JavaScripts. JavaScript being something quite interesting because it means that you can share templates between your front-end and your back-end. You can use the same template to generate HTML pages from a back-end and you can use the same in the front-end. So that's quite interesting to be able to use the same template on different technologies, really. Okay, so we saw an example where it was just about outputting something, just one place older. This is an example. It's quite common to iterate over items and echoing something and if there are no items, then you have sentencing data and there are no items, really. And as you can see, that's a lot of random noise, really. It's hard to understand what's going on. It's hard to understand what is going to be displayed, how it works. If you have a look at the same in tweak, first it's half the size of the previous one, right, half the size. And then, even if you know nothing about tweak, I've not talked about these random characters yet, but you can probably understand what's going on and you can probably figure out what is going to be output to the user. So the first thing I want to talk about is the core concepts that we have in tweak. And as you will see, we don't have that many different concepts. So the first thing, and we've already talked about a bit about that, the first thing you want to do in a template is to be able to say something, to output something, to replace a place older with a value, to inject a value in the template. And as you know now, this is how you can do that. Double braces, what you want to display, the name value, and you close the double braces. Now, sometimes you want to modify the content, right? The way you can modify the content that is displayed to the user is by using what we call filters. And a filter is what you put after the pipe, right? And here we say we want the uppercase version of the name, right? You have the output at the bottom of the screen, right? So a filter is a way to modify the value that comes before the filter, right? And you close with many different kind of values. So here I have a tag, a set of tags. You can join the tag. It's going to join all the values, all the items in the tags, in the tags variable, and then you have a string, because of course you can only output strings. You can't really output a set of an array. And sometimes the filters can take arguments. The way you can pass arguments to a filter is by using parentheses, and then you pass as many arguments as you need to. So here I say, okay, I want to join all the tags, and I want the tags to be separated by your command and space, right? Pretty easy to understand. I'm not going to show you all the filters we have, but this one is kind of interesting, because it really says a lot about the philosophy of twig and how we try to add new feature to twig. So here I want to display the number of tags we have. So I use the length filter. Pretty simple. The cool thing is that you can also use the length filter for a string, right? It does work, which means that many filters, that's not the only one, we have a bunch of other filters that can work for strings, arrays, objects, whatever. So as a web designer, you don't need to understand which filter to use based on the type of the variable. You can't just say, I want the length of this variable. I don't care if it is a string or an array or an object or whatever. So first it means that filters and many features in twig are predictable. And then we try to be very consistent, which is not the case in PHP, where you have to use Esther length for a string and count for an array. So you have different constructions for different kind of variables. So another example, you have a description. A description has some tags. You don't want the tags to be displayed, probably because you are in an email or whatever. So you can strip the tags, same as the PHP function, really. But the interesting thing is that you can chain more than one modifier, more than one filter, really. So here I say, okay, I want to strip all the tags from the description and then I want the uppercase version of this description. So you can chain as many filters as you need. So to sum up, a filter is something that you can use to modify a variable, to modify something that is going to be output to a user. And here you can see all the built-in filters we have in twig. You can add more, it's quite easy, but you need to write some PHP code. But by default, we have a bunch of them. We saw a couple of them, but you can go to the twig website to get more information about the other ones. And actually a small tip here. Whenever you want to know something about a filter or a tag or whatever we'll see later on, you can go to the twig.sensealabs.org website and then replace xxx with the name of the filter. You don't need to remember the path. This is the same as the PHP.net website, really. So just go to twig.sensealabs.org, add whatever you want to look for and you will be rejected to write a page of the documentation. So the first thing is about saying something. Then you want to access the data and the variables that are exposed in a template. So in the PHP code you expose, you pass some variables to the template and then the template is going to be able to access the data to display stuff, right? And in twig, we have the dot notation. The dot notation is a way to access data on more complex variable types like arrays, objects, whatever. And the dot is really at the magic bullet here because the designer does not need to care about the type of the variable passed from the PHP code to the template. It doesn't need to know if it is an object or an array or whatever, really, or a string or whatever. He knows that if you want to get the name property of the user variable, he can just use the dot. And behind the scene, twig is going to try several different things. It's going to try to access the user as an array, if possible, and get the name item from the array. It's going to get the name property from the user object if it is an object or call the name method or even the get name method, right? So we have an algorithm that is able to check and find out which way we need to access the data from this user variable. And that's great because, for instance, when you design a new website, you can create all your templates with twig without any PHP code, and you can just declare and pass the variables as an array of strings, make it work, and then you can connect the PHP code with the twig code without changing anything, even if in the PHP code you have objects, whereas you created the templates with just plain arrays. So that's a great way to let the web designer work alone without any PHP code and then at some point switch to the real structure of the variables. And of course, you can also chain the calls. So here I'm getting the company name for the user, right? You can combine everything together. So here I am getting the addresses for the user, and then I want just the first one, and for this result, which is the first address of the user, I want the city, right? And even if it looks pretty easy, behind the scene, that's not because the user can be an object or an array. The addresses method or item from the array can be an array of objects or an array of arrays and so on. So the number of combinations is really high. And that's why this call, the dot in twig, is the slowest part of the engine, really. And that's also why we created a C extension. So if you want to get the most speed out of twig, I encourage you to install the twig C extension. It's not going to replace all the twig implementation. It's just about replacing the implementation of the dot algorithm, really. And depending on the number of dot calls that you have in template, you can improve the performance a lot. The C extension is available in the same repository as the main twig code and compiling the C extension is documented on the twig website. So you can say something. You can access complex variables. And at some point, you can also want to use what we call expression. So in fact, when you have a double braces like that, what is inside is an expression. So when we say name, this is a variable, but this is a very simple expression, just name. If you remember the user dot addresses by first dot city, this is an expression, right? So anything in double braces is an expression, which means that you can do that, for instance. But you can, right? So we have the math operators, which can be more useful if you want to get the age plus one, whatever. So you can use operators to actually change the value of a variable. You can also concatenate strings. So here I want the first name of the user, then concatenate a space, then concatenate the last name of the user. Of course, you could also just output the user first, then a space, then output the user dot last. This is exactly the same. So this example is a bit contrived, but you get the ID. At some point, you might wonder if the item you want to get from the user is called first or first name. You don't remember. In this case, you can use a debug tool that is built in in Twig, and it's named dump. This is a function that you can call. And you pass, for instance, a variable. It's going to dump what the variable is. So that way you can get all the items that you can get from this user variable. So that's a great way to discover what you can call from a variable. You can also dump a complex expression, actually, so you can get all the variables available on the user company. And if you want to get access to all the variables that are available in a template, you can use this trick. So underscore context actually contains all the variables available in the current template. And here I'm saying I want just the keys and dump the keys. So this is a way to actually get all the variables available in the template. So here are the built-in operators. As you can see, we have a bunch of math operators. We have all the logic ones, the comparisons, and a bunch of others. I'm going to talk about later on. So the dot, the concatenate operator, the pipe for the filter, and we're going to talk about in and is later on. So now you understand the first main concept of Twig. Twig is able to output something. It outputs an expression. An expression is made of variables, variable data access, and filters. That's all there is to it, really. But at some point, you also need to be able to do something. We are talking about the presentation logic, right? We are not talking about the business logic. That's for the PHP code. That's for the model in the PHP code. We are talking about the presentation logic. So this is the other random characters you need to care about. Braces, a brace, a curly brace, percentage, something, and percentage, closing brace. So we have placeholders. Say something, and now we need to do something. But of course, as we are talking about a templating system, we need to find the right balance between giving enough features to the web designer to implement the presentation logic. But we also need to restrict all the advanced features to avoid, you know, that the business logic is actually coded in within the template. That's why you can't use PHP from Twig. And we have no options to actually switch the possibility to add PHP, and we will never add that because that's really bad. If you are using a templating system, obviously you don't want to use PHP. If at some point you think that using PHP is your only option because you can't do what you want to do in Twig, it probably means that you are not aware of a feature of Twig. First possibility, and the other one, is probably because you are trying to do something that does not belong to the template. And you need to refactor the code. You need to move this logic to the PHP code. So, and when I say do something, it means that this tag does not add put anything, right? Never ever. So I'm going to talk about two main tags that we have. The first one is four, and it allows you to iterate over things. So you say for article in articles, so this should be iterable actually, so it can be an object or an arrays, whatever. And then you do stuff, and then you have and for. So when you have things inside the tag, you always have the same convention, the tag name, and you end with an end tag name. And here the interesting stuff is that we also have this else statement, meaning that if there are no articles, then we are going to display no articles. So if you have some articles, you will have a list of all article titles. If not, you will have the no articles sentence displayed. Pretty easy to understand. Actually, when we are talking about an array in PHP, it can mean a sequence or a hash, really. So it means that for each article, you might want to get the position of the article, for instance, so you can do that with this notation. Or if you only want to get the position that you can call the keys, filter our articles, and it's going to return just the keys of this variable. Actually, after in, you can have any expression, right? We've talked about expression before. So here you can put any valid expression. So here we have all the addresses for the user. Here we have a range from 1 to 10. So this is the equivalent of saying I want to iterate over 1, 2, 3, 4, 5, 6. Up to 10, you can do the same with letters A to Z. Or you can have an array or whatever combination, whatever you want. Any valid expression can be used after the in statement. Interesting. When you are within a for loop, you have access to a special variable, which is only available when you are in the for loop. The variable is called loop. And it is automatically created by Twig, and it gives you access to a lot of interesting information about the loop. The index we are at, index 0 means that this one starts with 1, this one starts with 0. Loop first returns true if this is the first iteration for otherwise, and the last returns true if this is the last iteration of your array. And if you have nested four calls, then you can call loop.parent. It's going to return the context of the parent for loop. You can also use a condition. So you can say, I want to iterate over all the users, but only if the user edge is more than 18. So that's quite compact, and the expressiveness is really nice, instead of adding if before, which would add more noise to the code. And of course you can... Yeah, sorry. So that's the four keyword tag. The other one I want to talk about is if, and most of the time you just need for an if in the template, really. If is really similar to what you use in PHP. So if, then you have a condition. Else if, another condition, else and if. As you can see, this is the exact same convention. At the end we have and if being the tag name here. Raise it to understand. So as I said before, after the if you can have any condition. So if not user admin, if the edge is more than, you can have Boolean expression. Is, is a special. Is is a way to test something. So here we say, we want to check that the edge of the user is divisible by three. Or is even. Or odd. Or is empty. In is another interesting keyword. It means that I want to check that the user company is in this variable. Right, this rate here. And we have a lot of built-in tests really. So I've shown you divisible by empty, even, odd. We have a few other ones. And here are all the built-in tags we have in Twig. And we are going to talk about a few of them in a minute. And again, if you want to get more information about a tag or a test or a filter, whatever, you can go to twig.senseller.org slash the tag name, the filter name, the operator name, the test name, and you will be redirected to the documentation page. Okay, so that's all for the core concepts. You don't need to understand anything more than that. A way to say something, a way to do something. Expressions to express more complex stuff. That's all there is to it. That's Twig. Nothing more. Now, besides the basics, besides the core concepts, you can do cool things. And now I'm going to switch to HTML. Oh, not yet, not yet. Sorry. I want to go too fast. So the first thing I want to talk about is output escaping. This one is really important. And I think that Drupal is not there yet. But anyway, so sometimes you have a variable with some HTML, right? So this is the description of my article, for instance. And as you can see, I have some HTML tags inside. So when I want to display to output this description, it is what Twig is going to do by default, right? As you can see, all the tags are now escaped. That's because Twig tries to be secure or as secure as possible by default. Instead of asking the developer, the web designer to actually escape the variables when you output them in a template, we do that by default. We do that for him by default. But there is a but. So when we are talking about output escaping, we have more than one escaping strategy. This one is the HTML strategy. It works well when you output something in an HTML context. But if you want to output the same value in a JavaScript section, for instance, the escaping strategy is different, right? But as, I don't know, in 90% of the cases, you want to output variables in HTML. We do that by default. We are using the HTML escaping strategy because most of the time, that's what you want to do. Doesn't mean that you don't need to care about escaping quite the contrary. We do what we think is the best most of the time, but you need to think about that before outputting something. Of course, if you want to not escape a variable, you can say, I want the raw value of the desk. It's going to output the HTML, the original HTML without escaping anything. Being explicit about that means that we know that by default everything is escaped. And if something needs to be unescaped, if we need a raw value, we are explicit about it. Which means that if you want to audit, to make an audit of a bunch of templates, it's quite easy to have a look at all the raw values that you have output instead of checking all the values to see if you actually escaped them. Oh, by the way, it means that, yeah, perhaps I can show you, if you want to output the description in a JavaScript context, then you need to be explicit about that. So you need to say, okay, this description is going to be outputted in a JavaScript file or a JavaScript section. So please escape it, but using the JS JavaScript Escaper. So the escaping strategy depends on the context. And you know the context only when you output the variable. Which means that escaping variables before entering the template is plain wrong. It's plain wrong. That can't work. It can work in 90% of the cases, but for the other 10%, it won't work. That's why I think that, you know, escaping in Drupal right now, in Drupal 7, and I think it's still the same Drupal 8. The fact that everything is escaped before the variables are passed to the template is really wrong as far as security is concerned. And Twig is helping a lot here because it does the right thing by default for 95% of the cases. And then you can be explicit when you are not in the HTML context. So by the default, the built-in escapers, as you can see, we have only escapers for HTML because this is mostly what you are doing every day. And this is where we want output escaping. So we have, by default, the HTML strategy, JavaScript, CSS, HTML attributes, and URL. And it covers all the needs for HTML. So when you see that desk, by default, it means that it's going to be escaped for the HTML strategy. Whereas when you say this in PHP, it means that you are going to output the raw value without output escaping. If you want to escape this, you need to write this. Even more random characters I don't care about. I just care about the fact that I want the description here, but I need to use this very long function. And please remember to specify the car set. If not, you have a problem, you have a security problem. And of course, if you created a CMS or a framework before, you probably abstracted this so that it treats better. You created an edge function like this. But again, that's really very verbose and not really web designer friendly anyway. It's not even developer friendly, really. That's why I really think that PHP is the worst tumbling system ever. So we are talking about HTML. And at some point, when you develop a website with HTML pages, you repeat yourself a lot because from one page to the other one, most of the content, most of the structure is really exactly the same. So Tweak tries to give you tools to avoid content duplication and content structure duplication, especially when we are talking about HTML templates. So let's say that you have a sign-in block. Quite common in websites. You need to sign in to the website. So we have this block of content. This block of content does not change. The content is always exactly the same. But we want to reuse this block of content on different pages and not always at the same place. So for instance, there are a page. This is the on page index.html. As you can see, the sign-in block is here after the big heading. But on the about page, you can see that it is right at the top corner. So a way to do that, so instead of duplicating the content in the index.html and about.html page, what you can do is you can extract the code to a new file. So here I have created what you can call a partial. This is a partial template, which means that you can't really display this template to the user. It doesn't make sense. This is just a snippet of HTML code that you want to reuse in templates. So by convention, you can put them in the partial directory to make a difference between the real templates, the things that are going to be displayed to the user and the reusable parts of your design. Including this file is as easy as calling include. This is a function. I won't talk about functions, but you can think of functions as the same as filters, except that you don't filter anything. There is nothing here. There is no pipe. So the thing is include function, actually take arguments, and based on the arguments, it returns some things here. So here I want to include. I want to output the result of the inclusion of this file. So here is how you can structure your website. So I have this index.html page, the abouthtml page, and then I have a partial directory where I store all the partials that I'm going to reuse in different places of the website. But remember, the content is always exactly the same. The structure is always exactly the same. Sometimes in different places, you can have different variables. So you can be explicit about which variables you want to pass to the template. So by default, the main templates has some variables. And when you include a partial, when you include another template, it's going to inherit from the same variables. But if you want to pass some other ones, you can do so. So here I say, OK, I want to pass the login variable, which I need in this signing.html partial. And here I have the user, so I just call user login to pass the login variable to the partial. OK, so you can also pass more than one template here. That's kind of interesting. So what Twig is going to do is it's trying to try to include this user underscore sending out HTML template. And if it does not exist, it's going to fall back to this one. Why is it useful? If we are talking about a CMS, for instance, you create a default sign-in template, this one. This one is stored on disk, on the file system. But you also want to allow the webmaster or the website to actually change customers, these files. Instead of overwriting this template, which is not really a good idea, what you can do is to create a special loader in the PHP code that gets templates from the database, for instance. So in the back end, the webmaster is able to create a template based on this one. We store it in the database. And then Twig, if the template exists in the database, it's going to use it. If not, it's going to fall back to the default built-in sign-in.html template. That's quite useful. So let's come back to our website. So we have this index.html page. We have this about.html page. And as you can see, some of the contents are shared on all pages. The footer and the header are always the same. But it's not just about the header and the footer. It's really about the structure of the page. The structure of the page is exactly the same. What changes is actually what is displayed in the middle. So it's not just about the header and the footer. It's about the whole structure of the page. So even if you can use includes like this, you include the header, then you do your stuff, and then you include the footer, there is a better way. There is a better way also because if you are using includes, it means that in the header.html file, you're not going to have a full HTML structure. You're not going to have the end of the template. And the same goes for the footer.html page. So instead, what you can do is say, okay, not here, here. So for the structure in blue, this is the blue one. As you can see, this is a valid HTML page, right? And for the white space here, I don't know what is going to be displayed, but whatever, we are using these blocks in tags. And these blocks in tags means that here, it is a placeholder. We don't output anything because this is not, it's something tagged here. We say here, this is a placeholder and someone at some point needs to tell me what to put inside. What I know is that it's always the same structure here, and this part of the template changes for all pages. That's what we call a layout. A layout is an HTML file where you have some placeholders that needs to be filled somehow. How you do that? Yep, okay. So here, an example with index.html. So we have this index.html and we say, we want to extend, we want to inherit from the base layout. So we want to inherit from the structure, really, because we have the exact same structure. And now we say for the body block, which is the placeholder, where is the content? So as you can see, all the logic, all the structure, the whole structure of the page is in one place in the layout file. And then whenever I want to create a file based on this structure, I extend it, and then I create blocks to fill in what's inside. And you can do the same with the about page. So here is our structure. So we have pages. Pages can extend layouts and can include some partials. We can even specialize the main structure more. So as you can see here, we have two blocks in the content for the on page. And actually, this structure is shared on some pages. Not all of them, but some of the pages have the exact same structure. One block at the top and one block at the bottom. So we can specialize the base layout even more by creating a sub-layout. So I create a new section layout. So this is a layout. I want to extend the base layout. So the main structure is exactly the same. But then this block is... So I say that in the block body, I want to do stuff. I have a structure here, and I define two place holders. One is adding and the other one is marketing. So here it works. Here we have a layout, which means that at some point, we need to define what is the content for the adding and for the marketing blocks. But we won't need to define the content of the body block because it is defined here. So this is a way to specialize a layout even more. And you can have more than one, two or three layout extensions. So here is my index.html page again. So now I'm extending the section layout. This one contains the section blocks, but also the ones defined in the main base layout. So I have this R structure. And then I'm not going to define the body block because it's defined in section 1 template. I'm just going to say, okay, in the adding, this is the content. In the marketing, this is the content. So that's why I have layouts directory here because I can have more than one layout, and a layout can extend another one. Okay. It's going to be more and more difficult actually. So now let's say that this block has a structure. Let's say that I want to reuse this structure, but the content is going to be different. The title is going to be different and the description here is going to be different. But the structure is going to be exactly the same. So I want to reuse this block structure, but not the content. So you can't use an include, right? You need something else. If we have a look at this, so we have two place orders. So we want to have a title and a lead text. So I'm going to create a layout, partials, adding.html. So this is a layout, but for a partial. This is not a layout that is able to display a whole page. This is just about the structure of one partial. And then we will be able to create several partials with different content based on this structure. So for the index.html page, I can create a new partial, adding.index.html. So this is the heading for the index page. This is a partial. We extend the heading. Remember, probably, we had a block named title and as a one lead. So we provide the content for the title and the lead. And here is the main template. So again, we still extend the section layout to inherit from the main structure of the page. Then we define the heading and the marketing and in the heading we just include the partial that we've just created. And this partial, remember, extend a layout that defines the structure of this heading. Is it okay? Okay. You're sleeping. Okay. That's fine. But there's a problem here. This page does not make any sense anymore. We have just a bunch of extends, block, include, but the real content of the page is not there anymore. If you want to understand what is going to be displayed here, you need to go in two different files. You need to go to this file, probably because there is something here in the marketing stuff. But you also need to have a look at the adding.index.html partial to understand what is going to be displayed here. It's kind of important because the content is different on each page. So I can't guess what is going to be displayed here. It's quite different from the sign-in page, the sign-in partial because the sign-in partial is always about the same content anyway. So I know that it's going to be the sign-in block. I don't need to have a look at it. So we have too many files, right? What I want to do is I want to get rid of this adding.index.html because this one does not make any sense outside of the context of the index page. And if you do the same for the about page, it means that you would have an adding dash about.html file. So you're going to have a growing number of files. That's not a good idea. So what you can do is you can use the embed tag here. Let me explain. So again, I extend the section layout. I enter it from the main structure of the page. And then I say, okay, for this block, adding, this block, adding, I want to use the adding partial layout. And instead of creating a file, I'm going to define the blocks within this template. So the embed tag is a way to include a layout but by inlining the content you want to override. Which means that now I can have a look at this page. I can understand the structure of the page, but the content is now included in the index.html page. I don't need to create yet another file. So we have abstracted the structure of the HTML page. And you can still see the specific content for this page. Yeah, like this.  At some point, especially if you have a large content, a large snippet of HTML here, it can be kind of difficult to understand which block is ended here. So what you can do is you can add the name of the block. It does not really care. I mean, it's going to check that this is the right one, or for you just to get which block you are ending here. So here in the examples I've used static pages, page names really, but again, when you are using extends or include, it is an expression. So it can be anything that is a valid expression. So here I say that HTML and here I said that a page can be, the layout of a page can be different based on the fact that the user is connected or not. So this is something that you can't do with PHP. You can't have a dynamic inheritance in PHP. Okay. We are all lazy, of course. So just want to give you a quick trip, a quick trick and a tip really. Sometimes you have this kind of structure in the HTML page. So here this is a page where I want to display some content based on the current HTTP status code. So there is an error somewhere. I want to display an error page. So I say if the status is between 400 and 500, it means that the user did something wrong. And if it is a 4.4 then we can say that this is an unknown resource. The page does not exist actually. If it is more than 500, it means that a server did something wrong. And if not, that's weird. So there is something weird happened, but we don't know what. Really. This one is quite easy to understand, but you can imagine that if you want to customize more status codes, if you want to customize I have no idea, whatever code you want, it's going to be messy with all the if statements and the nesting of the if statements. Instead, you can use this. So here I've created a bunch of pages, partials really, that are going to be included in the errors page. And I'm saying this is the main for whatever error page. So this is the base page. This is a special page for 4.4. This is the 1.4.5. And this is the default page. If nothing exists. Then I say okay, I want to include the status. So if this is a 4.4, remember if it does not exist, it's going to fall back to the next one. So if this is a 4.4 error, the 4.4.html exists so it's going to include this one. If it does not exist, it's going to fall back to this one. Here I say okay, I want to get the first character of the status code 5, add xx.html. If it does exist, if it does exist, then use that. So if this is a 4 something, it's going to use it. If it's a 5 something, it's going to use it. If not, then fall back to the default page. And now it's quite readable. And if you want to add new status code just create a new template file with the content and name being the status code. So this is just an example, really. Just to tell you that even if we don't have many concepts, all concepts can be used to actually ease your job. So whenever you have something that looks really difficult to understand, difficult to extend, difficult to customize, there's probably a way to actually simplify what you're doing. The last thing I want to talk about is, you know, at some point you will have some errors. You expect the variable to be there, but it's not there. You have some kind of problem. So you want to minimize this, their impact, really.  So for instance, we have this default filter. So I want to get the user company, but sometimes it's not defined. So by default this is the company of the user. This example doesn't make any sense. You can also ignore missing templates. So you want to include this section based on the slug. So we have a bunch of articles, and the articles are categorized in sections. And you have a template for each section. But at some point probably you messed up, you removed a slug template or whatever. You can say if it does not exist, just ignore the include and just output nothing. And I showed you how to use an array of templates for the include tag. It does work in the exact same way for the extends one. So for instance, here we say okay, if we have a local layout for the user local, so for English, whatever French, Italian, whatever, use it. If not just use the default layout. So this is a way to define fallback templates. Okay, so that's all for today. It's already time to wrap up. So this talk was really about the philosophy of tweak, the main concepts, how to organize your template, but of course there are many, many more things that you can leverage. I've listed a bunch of them here, so if you want to learn more about those stuff, they are documented on the tweak website. The sandbox mod, the fact that you can use commands anywhere. You can reuse stuff with macros and a bunch of other things really. So please have a look at them if you want to learn more. And as there are quite a few people in the room here, I'm currently working on tweak version 1.14 or something. And I'm wondering if adding new operators like this one is actually a good idea or not. How many of you can understand what they do?  So now, how many of you understand these? Okay, quite a few. So for the others, the first one says I want to check if the email starts with tweak. The second one, I want to check if the email ends with tweak. And the last one says email should contain tweak. How many of you think that it should be added to tweak? Yeah, that's the problem. Every time you ask an audience if we need to add a new feature, of course, why not? So, and this is the last one I want to add. Do you understand what it does? No? No one really? One? Yeah, regular expression. So it's a way to say email whatever. So this is a regular expression. So this email matches this regular expression. Which means that you can express start with what it contains, but you have the full power of the regular expression engine, the PHP regular expression engine, actually. So how many of you think that this one is useful? Yeah, so the question is instead of adding a new operator, what about adding a new filter? We can, instead of defining these we can add a filter start with or add with or contains. The thing is a filter modifies a value. So upper you have the name and you want the uppercase version of the name, but it's still the name. We are still talking about the name. If we have a look at strip tags this is still the description at the end. So a filter modifies a value. If we add a start with filter it doesn't work anymore because it's going to return a boolean. So it's not going to return an email anymore, it's going to return something else, actually a boolean. We could use a function start with email for instance. That's why I'm asking a question. I'm not saying that I'm going to add these operators in tweak, but the fact that we have the exact same one in the CSS selectors, it might make sense to actually use the same. But then again I can understand that this is kind of yet another series of random characters introduced into the engine. So that's why I'm not really sure yet. By the way, there are some sprints on Friday so if you want to help Drupal 8 the core code or tweak, if you want to put into practice what you've learned today join the sprints on Friday. That's all. Thank you. Not sure if we have time for questions. Any questions? Any way? Yes. The question is which IDs support tweak, right? All of them. Really, you can go to the tweak on page the main documentation and you will see we have support for Veeam, TextMate, NetBeans, Eclipse you name it really. And if we don't have support for tweak if you don't have support for your ID check for Jinja support which is the same engine in Python. So you can check for tweak or Jinja but we have support for all the major IDs really and text editor actually. I will be there. So there is a tweak session, tweak lab this afternoon so if you want to join you are more than welcome and if you have any questions on tweak I will be there so I will be able to answer any questions.


Hello and welcome to the session. I am Asha and I am going to help you with the following question which says, by using the concept of equation of a line, proves that the 3.30 minus 2 minus 2 and 8 to our collinear. So first let us learn the equation of a line passing through 2 points a having coordinates x1, y1 and b, x2, y2 is given by y minus y1 is equal to y2 minus y1 upon x2 minus x1 into x minus x1. So with the help of this formula we will find the equation of line with any two points. So this is our key idea. Let us now start with the solution and let us name the points as a, b and the third point as c. So first let us find the equation of line passing through points a and b. We have y minus y1 is 0, y2 minus y1 so we have minus 2 minus 0 upon minus 2 minus 3 into x minus x1 which is 3. The equation of line is y is equal to minus 2 upon minus 5 into x minus 3 or we have minus 5 phi is equal to minus 2x plus 6 or 2x minus 5 phi is equal to 6. So this is the required equation of the line which passes through the point a and b. Let us denote this equation by equation number 1. Now point c which is 8, 2 well line on line 1 satisfies the equation that is it will substitute x as 8 and y is equal to 2 and we must get the right inside as 6. So let us find the left inside so we have 2 into 8 minus 5 into 2 is equal to 16 minus 10 is equal to 6 which is the right inside of equation of a line which passes through point a and b. So this implies point c lie on the line 1 that is the 3 points a b and c lie on the same line 3 0 minus 2 minus 2 and a2 are collinear. So this completes the session. Take care and have a good day.


This announcement is from the SCP Foundation and is for your safety and security. Secure. Contain. Protect. A dangerous anomaly named SCP-009, Red Ice, has affected the drinking water in your location. You should avoid all water connected to the main supply. If you consume an SCP-009, the water in your body will be converted into Red Ice. This will cause you to painfully expire and you should be very careful to avoid this. While the SCP Foundation works on a solution, you should own drink bottled water. This will keep you hydrated and safe from SCP-009. The SCP Foundation thanks you for your cooperation. Secure. Contain. Protect.


So I want to break away from the idea that America is suffering from polarization. We're not a polarized country at all. We're a country with one fairly normal political party and one highly abnormal entity. Why don't we want to call it a political party anymore? Now, why is that? It's asymmetric polarization. Okay? All right. You get asymmetric warfare, asymmetric polarization. Now, why did that happen? We can talk about all day long about people who were left out, people left behind, the votes of populism, blah, blah, blah. I blame the people who actually did it, who's the Republican Party, who back in the 1990s decided they were going to create a politics of rage. That was how they were going to win. Rage, rage. Rage. Well, the two go together in this case. Sure. Hatred. Hatred. Hatred. But organized hatred, which they thought that they could ride to victory every four years. They would rouse up the... They have contempt for these people, by the way. They don't really like them. They just use them. So for a decade and a half, getting onto two decades, they did this. They roused everybody up. No, we're never going to sell them out. They were never going to get rid of, you know, abortion rights right away. That was never going to happen. They continued and they continued and they thought they could ride it. But if you ride the back of the tiger, you end up inside. And that's exactly what happened to them. Exactly what happened to them. And the only one who figured this out, the great political genius who figured this out, was a failed New York businessman, named Trump, who understood what had been happening. But I blame a whole succession of Republicans who now we all like very much, right? They're never Trumpers. They're all our buddies. They were the ones. So there's an historical thing. I believe that you can explain politics best by explaining politics, rather than trying to find all of the social roots. Yes, they're there, but somebody's doing it. And I think that if we look at all of these places, by the way, we'll find a similar kind of dynamic. I disagree, absolutely. Absolutely, absolutely, completely. So I know I've been called in to talk about education, but you just hit all the wrong buttons. What I see in the US is not one side of bad people who just got real bad. What I see is that the thing that goes by liberalism that the Democratic Party has stood for in the past has been under a long stage of decay. I come from the Bay Area in California. Very, very progressive, very, very Democrat, deep blue. There are literally hundreds of thousands of homeless people in California. No, no, no, it's not because the Republicans went in there and made them all homeless. No, no, no, so what you have is you have the rise of globalization, you have the rise of global capitalism, and you have this class of people who mouth progressive words, but they fight for the most powerful and the wealthiest people when the chips are down. I don't agree with, I'm not a fan of Trump, I think he's despicable, but I think you have to look at where that came from, what they're responding to, what they see when they look at our country, and it's not somehow that they see like troglodyte sort of blurry things. What they see is a country which no longer cares about their well-being, which no longer respects their point of view, which no longer cares about their education, which no longer has any interest in their flourishing and only wants to see them suffer. That's what I think they see. I agree with 95% of what you just said. 95%, 95%. Especially with the progressives, that's not my side. The people who are in San Francisco, you know, what's his name, Boudin? Yeah, Chazer. Chazer, these are not- That's a very minor figure. I understand, but what I'm saying is- It's Silicon Valley, it's Jeff Bezos, it's- I agree, I agree with all of that. Very good Democrats, Bill Gates, these are the people- Biden got through that big piece of legislation a month ago. How did he do it? Because Bill Gates got interested in it. Now, people talk about the Russian oligarchs. All true, all true. However, however, it is not that these are troglodytes. These people are being exploited, they're being used, they're being duped, but they're being used by people who really are evil. We will keep experiencing this crisis of democracy because this crisis is basically an expression of panic. It's all about panic on the part of people who think that either something is being taken away from them now, or something has been taken away from them a long time ago. And when people talk about pluralism, it's very important to understand, and you know, America, we pride ourselves that pluralism is our public philosophy, India prides itself on this, and so on. In fact, it's murderously hard to get people in a society to live with difference. It's murderous, I mean, murderously, literally murderously hard. And so in Europe, for example, I think there are only two choices open to Europe. The recognition of multi-ethnicity or fascism. I don't see any other choice. And I think that until we deal with these problems, with this reality, then we're gonna experience this crisis over and over and over again. I totally agree with you. We have to understand that democracy isn't, you know, it's a very complex regime, and it's not a natural political regime because freedom is very complex. You have economic freedom, political freedom, social freedom, et cetera, and you have oppositions between all this category of freedom. You have to try to reconcile all this. And because, in fact, you are not, you don't born as a citizen of a democracy. It's an education, an education to responsibility, an education to respect of the others. And that's why, in fact, we have to understand that there is a democracy can't be quiet. And democracy is not permanent. It's always contested. It's always fragile. If you look the first democracy, since it was just 60 years, between it was 461 and 404 before Christ. And since the Athenian democracy died of its defeat against Sparta, but in fact, the real cause of the defeat against Sparta was the fact that the Athenian democracy broke down and that it was the populist of this time who went to power. So we have to understand, and that's why, that it's true that democracy are peaceful regimes, but freedom will always be a fight.


You all are greetings.ost today. Hello everyone, it's Vicky here and welcome to the sixth day of my Christmas ARGENAL series. Today's inspiration comes from this dieset. These are the ornament birds and I'm going to use one of the ornaments, a bird, and I'll combine it with my favorite of these series which i have used of two of my projects already. Today, instead of working on my ARGENAL book, I will work on a loose watercolor paper. Αυτό είναι σύγχρονο βασκόματο και η σημανή είναι 8x8. Αυτό θα δημιουργήσει την ευκαιρία για να αντιμετωπίσεις για ένα σχέδιο, αν θέλεις να δοκιμάσεις μέσα στο σχέδιο. Αλλά μπορείς να δημιουργήσεις αυτό στο σχέδιο ή σε ένα σχέδιο like αυτό, που μπορείς να δημιουργήσεις για να δημιουργήσεις. Τώρα, επειδή πρέπει να δημιουργήσω ένα μεγάλο χώρο, θα πάρω με σπράσεις. Αυτές είναι οι μου φαύσεις τελευταία. Είχα να δημιουργήσει κάτι που είχα να κάνει με φαύσεις πλούς και σύγχρονο χώρο και γρήγορα, οπότε είχα decided to go with speckle tec and iced spruce. Αυτή είναι μια καλή συνέχεια και θα χρησιμοποιήσω οκσίδες. Αυτό θα έχουμε ένα πολύ νουτή σχέδιο και ένα σχέδιο τελευταίο. Αυτό δημιουργήσει έναν καλύτερο βασκόματο και μπορείς να δημιουργήσεις σχέδιο like αυτό, αν θέλεις. Αν θέλεις γρουμφή και σχέδιο τελευταίο ή μπλήτου, θα μπορείς να το δημιουργήσεις σε λίγες χώρες και αυτό είναι σχέδιο βασκόματο, για να μην χρειαστεί ένα κομμάτι με λασσάκο. Αν θέλεις να μπορείς να θέλεις να γρώσεις ένα λίγο νερό στο πάνω της σκέδιου, για να βρεις όλες οι χώρες να εξετάσεις δύο more. Μπορείς να μπορείς να δημιουργήσεις και να βρεις και να εξετάσεις δύο better. και χρησιμοποιηθώ για να καταλαβαίνω ότι everything is completely dry before the next step. Τώρα θα κάνω κάποια στενσλή γιατί θα χρησιμοποιηθώ για έναν καλύτερο στενσλί που έχει αυτό το πλαδικό σχέδιο στον κομμάτι και θα πω σε άλλες περιοχές, χρησιμοποιηθώ για το σπέκλι-δεκ. Αυτό είναι το ίνκ που χρησιμοποιηθώ για το σπέκλι-δεκ, οπότε δεν παρακολουθώ κάποια νέα νέα χρησιμοποιηθώ. Αυτό θα χρησιμοποιηθώ για κάποια σπέκλι-δεκ στο σπέκλι, αλλά στην ίνκ θα δεν θα χρησιμοποιηθώ για να πω το σπέκλι-δεκ. Αυτό είναι ο ιστορός μου γλώστασης με το σπέκλι-δεκ, επειδή ας ανοίγουμε να είναι πολύ σκέτος. Το στενσλί είναι ένα από τα τεχνικά που χρησιμοποιηθώ για το σπέκλι-δεκ. Ένα άλλο που αγαπηθώ είναι να παρακολουθώ για το στενσί, αυσχετικά με το σπέκλι-δεκ. Δεν θα κάνω αυτό για αυτό το σπέκλι-δεκ. Δεν θα τ με στενσί. Θα πω ένα παρακολουόκημα, για ένα άλλο για τη μπαθοδημότη, αυτά διούσα να μοdim ένα σπέκλι-δεκ και θα πω ένα σπέκλι-δεκ, αυτό είναι Φαίδι τυνίως να δεν χρησιμοποιηθώ για όχι αυσιασμέ. Από αυτό που θα δημιουργήσω αυτό είναι να παρακολουθώ για να σπέκω, με ένα τρία σπέκλι-δεκ στο σπέκλι-δεκ από τη βασικού ει εγώ. Πάνω, πιστεύω αυτή την butteξιά εχεί, αλλά δεν είναι πολύ βιβραντική. Τώρα θα αφήνω σε ένα τεχνικό τεχνικό και θα δημιουργήσω ένα σχέδιο όλοι για το σχέδιο μου, για αυτό πρέπει να χρειάζετε ένα βιβλό λευκό λευκό τεχνικό τεχνικό σπίτι, όπως και σχέδια. Τα αυτές είναι από στάνπερια, σχέδια από στάνπερια, they are absolutely gorgeous. Αυτό δεν είναι σχέδια, they are very lightweight so they are going to stick on any type of glue really easily. You can use matte medium if you like or any other type of glue in paste form. You can even use white glue and stick them on top. I decided to work with double sided tape just because it is mess free. So since I'm using this wide double sided tape I'm going to tear it into half so I do have long strips but they are thinner. Plus I like that tiered edge which isn't completely straight. It gives a more organic look and it would look better when I stick the flakes on top.  So you see how I did one side. I'm going to repeat the same process for all four sides. And then I'm going to apply on top my snowflakes. I am working on a scrap piece of paper so that they can easily put back in the jar all the leftovers and I can use them again. These snowflakes are chunky but really very lightweight so they are going to stick nicely on top of the double sided tape.  I had no problem with them falling out once they were down there. And I went over that double sided tape with my fingers just to make sure that I don't feel any stickiness at all anywhere making sure that it is completely covered up with snow. And of course I do have to add my white glasses. After all I'm going for a wintery look and feel. Now I'm going to put this background aside for those glasses to dry and I will work on my focal points.  A couple of times from different shades of red cardstock and one more time out of black. I put my bird together and if you notice I do have a foam square at the back of the wing that is at the front. So this way I add some dimension and I am going to use a second wing at the back just to have some more depth. Now, since this is a wintery look and feel project I want my birdie to be a cardinal.  Remember that you can be creative even more creative with your dies and you don't have to use only the pieces that are included. You can improvise and make them your own. Now these are the dies that are included in the set with the birdies that create the ornaments. You can mix and match them to create different styles and I love the retro look and feel on them.  Now, mix and match all those different die cuts there is no correct way of how we can put them together. I do want to add some dimension so that's why I'm using foam squares at the back and then I'm going to stick that on the other red cardstock. Now, the one that I have at the back is slightly darker so it is going to give the hint of a shade. The idea is to have the birdie holding the ornament and I'm going to give him these branch to sit on but I want to create a visual triangle with red.  Now, in the beginning I wanted to have that branch green but as I move along and I see the project and the way it is going I absolutely love the colors that I have already so I don't want to add a new color to introduce a new color.  I think that that silver cardstock with the snow that I have on the frame and the little silver accents on the ornament are going to blend nicely and it's going to bring the whole thing together. To add more interest on my leaves I'm using a tool here and I'm just drawing lines. I'm doing that on a softer area and of course you can do that on a mouse pad if you like and if you don't have such a tool like the one that I'm using here just use the back of a brush or something quite pointy that is not going to tear the paper however. Since I'm planning to frame this project I can add some dimension so I'm using my fingers to add some curve on the leaves and then I can stick it down. If you are adopting this idea inside the pages of a book then you can just stick everything completely flat. I'm adding some shadows on the red pieces this is going to help them look more dimensional and for that I'm using walnut stain this is the brown color that I used for the background sometimes the less color you add on a project the more elegant it looks and now finally it's time to stick everything down first I'm going to start with the branch I'm starting by sticking down the branch making sure that I have enough space at the top for the bird to stay there and I didn't completely stick it down you can see that I have the leaves curled up and now I'm placing the ornament and the bird trying to decide where I want them to be and then I'm going to create a couple of holes where his nose is and at the back of the center of the ornament and I'm just using a ruler here to make sure that these are completely vertical and then through those two holes I'm going to thread some silver line this is going to look as if the bird is holding that thread and the ornament is hanging from that of course you can use a needle if that is more helpful but I did make quite big for those holes so I can easily thread it at the back and then I'm going to secure it with double sided tape I'm going to do the same thing for the other hole I absolutely love when a project has different elements and not just paper so you see here I have the snowflakes, the thread I think that it makes the project look so interesting and that's why I love mixed media now I'm going to stick the bird down and if you want you can even add more dimension by using foam tape at the back but his wing is already popped up so I think it's just fine I'm going to stick the ornament directly on top of my project as well as I mentioned on the top layer of the ornament and then finally I'm going to stick down the berries and you can see the visual triangle there with all the red accents on my page now I'm also going to use that silver thread and I'm going to tie a little bow which I'm going to stick at the top of the ornament just to add some more texture on the project and the way this project is designed has enough blank space just next to the ornament you can add a quote if you like that's of course not necessary on a mixed media project however I absolutely love adding quotes on my project and that's exactly what I'm going to do you can stamp there, you can die cut you can stick stickers it really has enough space for you to play with I decided to go with a combination of die cut elements and a chipboard quote so I die cut the letters to spell the word peace by sticking down peace on earth this is a chip quote by Tim Holtz it is quite dimensional and I love the red letters that matches perfectly with the rest of my project this is how it's going to look inside a shadow box I didn't put the glass on top which I always like to do to avoid dust but you do get the idea of how it looks I just wanted to avoid the glare of the glass under the camera so here are some close up photos just like always you will find linked down below everything I use to create this project so I hope that you had fun today that you got inspired and don't forget to leave me a comment thank you all so much for watching and have a lovely day


Hello everybody, thank you very much for coming. I'm from the Sawas music Department, I'd just like to welcome you here to this evening of Contemporary satiety station. There are two items on the programmes tonight, the first one is by Leila Barwer Dance Troop, which is based here in UK, and then there won't be an interval,


Lovely to be here. My name is Jalmar Stolbanud again. I'm the CEO and one of the co-founders of karma So what is karma you ask karma is? Can I see what you're seeing up on the slides? Great, thank you. So At karma we're working with food and not just any part of food, but actually with food waste and Food waste is a huge issue One third of all food that's produced is wasted before it's ever consumed and the more developed a country is the more is Wasted so in the US for instance their reports where it's up to 45 to 50 percent of all food That's produced wasted. This is an insane amount of food. It equals to 1.3 billion tons of food annually it equals the emission of a billion cars a year and It's at a value of $90 billion so it's something we should really do something about So what we want to do we want to change this behavior into something completely different. We want to turn this into a Completely new behavior. So basically we created an app called karma Karma is a super simple concept. We help restaurant cafes and grocery stores upload their surplus food to our platform And we redistribute it to all of the users of our app So all they have to do is really input their food. It takes super short amount of time It takes 60 seconds to get started when you're started with karma putting out a sale takes less time than actually throwing the food in the bin We have an 80% sell-through rate and as a restaurant you earn on average $8,500 and let me tell you this is the average a grocery store in karma earns up to like 50,000 euros extra every year just by taking care of their food waste And we always get the question like how complicated is it for the user? This seems like a hassle Well, we took the entire user process into this presentation. You just tap whatever it is you want and You pay directly in the app and you're done That's it.  So it tastes a little extra good So how are we doing so far? We're doing pretty good according to ourselves. We launched the platform one year ago on November 8th, so we recently had our one-year birthday and We have over 200,000 users. We have a thousand restaurants in the app We're only live in Sweden so far, but our next market We're going to is actually the UK and you guys are some of the first to hear it. We're really really excited about that So how did we do this in like one year? So we're good at a few things, but we really prioritize our brand We think it's super important to have a strong brand in this business and make sure that we communicated right We're also super keen on having the best people so it's probably everyone in the startup industry, but we really take it seriously and I mean, I shouldn't take any credit for this myself We're four fantastic co-founders and we have 21 brilliant colleagues at home who's probably watching from somewhere right now We really care about product We make sure that the the user experience comes first and we're customer obsessed So we always want to get feedback we implement like every kind of way to get feedback from our users and customers Which is super important for us We also a little bit nerdy about data. We do full on data-driven decisions We put up monitors all over the office with live data for every department and people said we were kind of crazy But it turns out you can actually make better decisions when you have the data live in your face all day long So again a big shout out to our fantastic team back in Sweden. This is just some of them and Yeah, that's it for me. Thank you very much


Okay, so thank you all for coming. The science of happiness. I'm not really a scientist, but I'm really happy to be here, so that counts, right? Okay, so what do we really know about happiness? So we know that it can be caused by anything or anyone, and that everybody has different happiness triggers. For me, it's ice cream, I love ice cream, so whenever I eat ice cream I'm really happy. And let's say that our happiness triggers really change as time goes by. And also, we can categorize certain happiness triggers. For example, let's say that lots of people that are starting with web development and creating websites, they are using Joomla. And as a good friend, you come along and use WordPress to them. So what's going to happen? Chances are they're going to be very happy. I'm going to stop there, so okay. So next thing, what do we know about ourselves? So we all want to be happy, right? And we also all want to have successful businesses. And we also want to maintain our successful businesses and make it even better, right? So how to run a successful business? I'm not going to talk about that, because chances are these guys can tell a lot more about that. But what I am going to talk about is happiness. I'm going to talk about customer happiness, how to achieve it, why you should achieve it, and I'm going to use science to do that. So let's take a look at a few studies. A study of major lottery winners found that on average they return to their original baseline level of happiness within one year. Why? People are good at adjusting at good things. I mean, they adjust very quickly. So these material goods, they only provide temporary emotional boost, which fades quite quickly. So what is this thing that provides an increase in happiness? It's the quality and the quantity of the relationships. And that's the main thing. So before we dive into the subject, a wise man once said, and then put his quote here, from the moment the customer hears about you, enters your store, starts using your product or arrives at your website, a relationship is created. And it is up to you to notice that relationship. Basically, I just need to make one correction here. I meant a bald man once said. So yeah, hi. So I'm a happiness engineer at Automatic. And I put this paragraph on my website, customer happiness, and let's talk about customer happiness. So there are three scenarios, most common scenarios, how customer happiness can be achieved. So let's take, oh, no, I skipped the slide. First of all, we are all customers, right? So we go to the grocery store, we are customers. We buy something online. We are customers. And also the majority of us in this room, we have our own customers. We are plug-in or team developers, we sell our software, our service. And what are the questions that we need to ask ourselves in order to, how can we achieve customer happiness? So basically, the first question, the most important question, is when do I, I mean, we as customers become happy? And when we also put ourselves in our customer shoes, we'll see another question pop out, and that's it, when do our customers become happy? So let's take a look at this, when do I as a customer become happy? So three possible scenarios. Number one, when you bought the product or use the service and you're satisfied with its performance, right? So that's number one. Number two, when the product or the service you used actually exceeds your own expectations, and that is also called customer delight. And there is also a very common scenario, number three, when you are relieved that the product or service wasn't as bad as you expected. So let's take a look at the definition of customer satisfaction. So it can be defined as stepping out of the experience in order to define it and evaluate it. Someone can have a positive experience, which can lead to negative one, even though the experience was positive, it wasn't as positive as one expected. And that's the main thing. So satisfaction or dissatisfaction is not just an emotion, it's an evaluation of this emotion. So let's take a look at the practical example. You have a product which has reached a certain level of performance, a product or service, and you have your potential customers. So they have created their own level of expectations, by our marketing team, by themselves, by other products, et cetera, et cetera. So these two influence one another. And if the performance of the product or service exceeded customer's expectations, you gain customer satisfaction, which ultimately leads to customer happiness, which goes on to customer loyalty. You have loyal customers. They're bound to spread word about your product or your service. So you're going to use word of mouth, and we live in digital era, so word of mouth is also very common, and it's a lot louder word of mouth. And this is how you gain new customers. So new customers come, they have their own expectations right now, which are probably just a little bit higher than the ones before. And this is a cycle that repeats itself, and it eventually makes your business grow. So let's take a look at this formula. So satisfaction is a function of the customer's expectations and the performance of the product or the service. I'm not reinventing the wheel here. This is something already done by Oliver Richard back in 1981. But the thing is, this formula also works in real life. So your satisfaction, your happiness directly is influenced by your expectation of the certain product or event or service or anything else. So let's take a look at one practical example of this. Let's say you have a product, packed in a box, wrapped up. Let's call it perfect product. And there is a certain customer that wants to buy your product. They have their own expectations. Just for the sake of this presentation, let's call that customer, let's imagine he's Batman, all right? So you have a potential customer, Batman. He has his own expectations. And what happens? The customer goes to the store, buys your product, and later you discover that that customer is Batman. So Batman starts using your product, and Batman will either be satisfied with your product or he won't be satisfied with your product. So let's say like this. You develop an app, an app that allows you to send SMS notifications to a cell phone whenever there is a bad signal up in the sky, OK? So Batman sits comfortably in his home, watching TV, drinking beer, and all of a sudden in the news he says, oh my god, there's Batman, there's Havoc in the city. And Batman's like, OK, I didn't receive an SMS. So what's going on? So after he pops into Batman Bill, takes care of the villains, he comes back and what does he do? He calls your customer service. And he's like, OK, what's going on? Why didn't I get an SMS notification? And if the customer service is not a very devoted team full of enthusiasts, well, the chances are that Batman is probably going to be very dissatisfied.  And this is something that happens with word of mouse. So word of mouse, when there is a bad thing that is going to spread, it actually covers a lot more distance in a very short amount of time. So Batman is eventually going to come and get you. If that happens. So let's take a look at another scenario. Another scenario is we have a helpful customer service. So how can I help? And if you help Batman, for example, oh, Mr. Batman, sir, did you enable push notification inside the settings, for instance? And he's like, oh, I forgot. OK, thank you. Thank you very much. And you get to keep your product intact, right? And you're probably going to gain Batman as a loyal customer. And I can say that's quite a relief, right? So there is one question that pops into our minds right now. And that's why wouldn't we just lower the customer expectations, right? Because there wouldn't be so many dissatisfaction. We wouldn't keep the bar so high. So actually, the thing is that's not a good thing to do because of several things, but I'm going to just mention two. First one, actually, we're making it more difficult for our competitors to stay in the game if you set the bar so high. And another thing is we're all growing together. So for instance, if we have a product or a service with certain features, and those features are awesome, they have a stellar customer service and so on and so on, tomorrow these features are going to be an industry standard. This stellar support is going to be an industry standard. And we are all growing and evolving together. So I'm just going to wrap up. It's not food for thought. So just like WordPress hooks, we can also choose to hook on the positive emotions of our customers. So we are using filters and actions. And for instance, we can use happiness to hook on the positive emotion. Have you noticed the new titles, I mean, new titles of major companies and every single company developed? You don't have customer support agents. You have customer success champions. And in Automatica, we're all happiness engineers. So this is something that influences both customers and employees themselves, also on the conscious and the subconscious level. So we are bound to spread happiness. It's not just solving a ticket or two. It's about spreading happiness. And when the customer has a problem and he comes to you and gets an answer by a happiness engineer, not just a customer agent, he's going to be just a bit happier at least. And I thank you very much for listening to me. If, by any chance, you didn't like my talk, it's probably because your expectations were too high. Thank you.


What is up you guys, welcome back to another one. If you are new to the channel, I am Goldpony. Today, I woke up at 4.45 a.m., so excuse me if I'm a little less energetic than I typically am in my videos, but today we are at, can we see this? There it is, Cervines. So, couple months ago, the way this works is couple months ago they said, hey, we like your car, we like the color, can we borrow it to prototype a hood to basically do some research and development, make sure it's all fitted correctly. I actually took several other Mustangs as well to make sure that happened correctly, but all in all, the way it works is they kept it for about a week, then I came back, picked it up, went on back home with my stock vehicle the way it was originally. Couple months later then, I came back, they say the hood is ready, it's ready for production, feel free to swing by, we're gonna put it on for you, we're gonna paint it, all that fun stuff and make sure it looks awesome, and it does. I'm gonna show you guys in a couple seconds here, but then in addition to that, they say, hey, I think we can make it look a little better, I think we can make Stengosaurus look, dang that truck is loud, I think we can make Stengosaurus look a little better if you're up for it. And I essentially said, I've seen what you guys do, I know this is gonna look amazing, yes, do what you want with Stengosaurus and that's what they did. So, and all of this stuff on Stengosaurus that you're about to see is available on Serrini's website, which I'll put a link in the description box below, it's probably available on CJ Pony Parts as well, but I know it's available at Serrini's website, so be sure to check it out because this looks absolutely amazing. Also, be sure to check out Stengosaurus at Carlisle Four Nationals, it will be at the Serrini booth, so if you wanted to see it up close and in person, but now without further ado, let me show you guys Stengosaurus, it looks absolutely amazing, I'm gonna go over everything they put on this as well, so here it is. Here she is, let me start with the most obvious, this is what I originally brought it here for, this is the brand new stalker hood. They've had the stalker hood previously for other generations, but it is brand new to the 2018 for them, you guys know what I'm saying, but that's the stalker hood, so this is a functional air inlet by the way, it actually sends the air over here and to an intake, if you actually had an intake, I have the factory air box of course, but if you had an intake there, this would be very functional for you.  Also front grille, you guys can see the Cervini grille, and they actually touched up some of the stuff behind the grille as well, just to make it look even better, so it looked even blacker up there basically, and of course it's top and bottom front grilles. And of course you got the front chin spoiler, giving it a little more lowered look, more aggressive appearance up there, and that's how the side of it looks there, but making our way to the side, because we're not ending here, you guys can see the accents on the side skirts there, also a little touch back there, and then the side scoops, and I love these side scoops, the reason why is because this line on the Mustang here, it ties in perfectly with those side scoops, even on the bottom, so I've always been a fan of those, I was actually kind of planning on getting them, so Cervini just made it happen a little sooner than I was expecting, but also you have the Cervini's stocker rear wing there, again, with my car having all these black accents, I love that this is accented in black, they're a matte black, and again, they finished up the stripes on that sucker as well, so looks absolutely amazing. And finally, lastly, this last piece is a prototype by the way, and I think they do plan on putting it into production, but they did this little piece here, and it kind of ties in perfectly with that, so I absolutely love it, and I like how this little piece ties in with this little piece, it has the same design to it. All in all, I know it's a prototype right now, but I would say I can't imagine this would cost too incredibly much, it's not covering the whole diffuser back here, but I can imagine they would sell a lot of these because they look amazing as well. Let me actually go back to the hood for a second, I wanna show you guys what that air inlet looks like underneath the hood here real quick. All right, and so there is the air inlet, it sends everything over to here, which is right over top of the air box in my case, but possibly your cold air intake. I think that's pretty cool, it's a functional hood, and I also like that they put their name in it. That's kind of cool, a little Servini's, excuse me if the camera's shaking now, I'm holding this hood with one hand, and yeah. All right, so overall that is it, that's what Stangosaurus has been gone for me for three weeks now, so happy to see you're back again, and appreciate you guys, because honestly without you clicking this video, without me having some kind of a presence online, I guess, then this kind of stuff usually doesn't happen, so appreciate you guys more than you know. Also again, appreciate Servini for making all this happen, and I will see you guys Carlisle Ford Nationals, be sure to check out Servini's stuff at Servini.com and CJPony Parts. Thank you for watching this one, feel free to follow me on social media, and I will see you guys in the next video, stay gold.