 Okay, let's get started. So this is actually called All About Twig, or templating in Twig with Drupal 8. My name is Megan McDermott, and my company is called Will Which Web Works. We call ourselves a small team that can do big things and using open source and Drupal, and being part of this community is what allows us to do that. There's a little bit more about me that you can read there, and I just realized the other day that I've been doing website development for about half my life now, which is pretty crazy. And yeah, 20 years ago last summer, I remember making my first website. When I discovered Netscape Composer, I realized that to make my own website, and I still think it's pretty awesome to be able to do this. So we're gonna spend maybe 10 or 15 minutes looking through some slides of Twig basics, and then spend the rest of the time looking at some actual template code, and kind of seeing how some of this stuff works in real template files. So Twig was adopted for templating in Drupal 8. It seems like it was a pretty quick decision and an easy no-brainer to do, and this is another part of getting off the island and using things that are used in a lot of other ways in the PHP community. One of the things I think is cool is that you can see all these other frameworks and tools that use Twig as well, so that you can get off the island as well if it makes sense for a particular project. It also helps with security, and a big concern with PHP Template was that there's opportunities for security issues in template files, and as a good developer, you wouldn't do that sort of thing anyway, but not everyone is that aware. And it's also a good developer experience, a lot easier to use and access the values that you need with Twig rather than trying to figure out all this PHP stuff. So here's some basics. So for printing something out, you have two curly brackets that just outputs, in this case, a title. To do something, you start with a curly bracket and a percent sign, so we'll see how that works in some real template files in a little bit. So with things like this that you can do in Twig template files are things like setting variables or if statements or loops, and we'll look into different ways to embed or include other code or different things like that. And a curly bracket with a hash is a comment. So I think on all these slides, I have some documentation where you can download my slides from the Drupal North website and read more and find out more about how to use these different things. Outputting field values to access parts of a render array and do content dot your field or the field zero is the first value. And we'll see a lot of different examples of how that actually works in different cases in different template files. You can check the comments. Every Drupal default template has a whole lack of comments at the top that show you which variables are available to that template and what you can use there. And you can use preprocess functions to change or add to the variables that are available there. And that's a really powerful thing about Drupal theming that lets you do all kinds of crazy stuff. And if there's something there that we need that's not, then that's what preprocess functions are for. There's a really good medium article here. This was just on the Drupal newsletter the other day. A lot of really detailed instructions on how to get different field values and different parts of field values or link fields or the title of a link field and things like that. So that's a good place to go if you need more detailed examples. So twig filters is a way to modify the output and change what's coming from that field value or whatever else you're outputting. You can use most PHP string functions in there and that's what's in the twig templating documentation there. Drupal has added a bunch more that are really interesting and you can probably recall these things if you have Drupal 7 experience. So translations is a big one and of course it's best practice to just output everything and make the texture or bring it into a template file to translate it. Even if you think this is never gonna be translated, maybe it might be and then you're in the practice of doing that if you ever contribute code back to Drupal.org. Clean class is a good one. It'll strip out everything, any spaces, special characters, convert underscores to hyphens and make a nice clean class. And that's one of the first things you'll probably see in a template file that we'll look at in a few minutes. Without is hiding elements in render arrays. So in Drupal 7 you might remember there was a hide thing where you hide the field and then you'd output it later. And that was kind of a big thing that was easier to do in Drupal 7. So here this is the same kind of thing. If you wanna output the content from the managed display setting in your entity without those fields, then you can just run it through the without filter and leave out the fields that you don't wanna render there. And there's more information on the Drupal.org documentation. So using variables and conditionals. So this is actually just different ways of doing variables. And you can set a variable that you might use in different ways later. You can set a simple variable or the classes is an array. And again, this is one of the simple examples of how this is used in a lot of template files. And I think most of any template file is gonna set classes first. Particularly for nodes and that's an example from the classy theme of how it's generating classes. So it's setting a classes array. There's a node, there's a node type is the, and you can see the little squiggly there is like a concatting, like a dot and page view. And that's combining those two into one class into one element there. And this is the next one there is a little one line conditional. If there's a V-mode then add that as a clean class. Conditionals and loops and more different things that you can do. So you can do simple conditionals. If there's a title then print the title. We can do a lot more complicated things with ands or ors and different combinations of that. There's loops, that's a common thing in a field template when there's multiple items. So you loop through the number with the items that are there and put them in list elements. Attributes is something that a lot of renderers have that comes out of Drupal that are rendered in the template file and we'll see how that works in a little bit as well. Attaching the libraries. So libraries are an interesting part of Drupal 8th gaming where we can attach a library only where it's gonna be needed. And if it's only gonna be needed on this template file, you can attach that and classes node template file is a good example of where it's attaching a library just for that template and wherever it's used. Macros are also interesting and if we get a chance, we'll look at that in the menu template where it's actually kind of repeating itself to generate a nested menu structure. Paths and URLs. We can also generate URLs. URLs expect a system route, which to me is really confusing in Drupal 8th, but you can often Google how to get a path to a specific entity or there's a really great reference from Chromatic at the bottom here that has all kinds of different samples of how to create routes to a view or an entity and how to pass arguments. If you wanna link to a view with arguments, then you can pass that as the parameters there. And that's what we see in the second example, which is a path to an entity node and it's passing in the node ID, which this template is already aware of the node object and it's gonna get the node ID and pass that in. And I believe the Drupal.org documentation has a little bit more examples of how to get a file URL, so that's also an interesting thing we can do directly in Twig. And all this really enables us to do a lot more on the template level, which we used to maybe have to do in a pre-processed function and it got pretty complicated, so it gives you a lot of power to do things just at the template level and it's also a lot of flexibility to do things on the template or do it in a pre-processed function, which is always a challenge to figure out the best way and the most consistent way to do things. Walks and embeds and includes. We're gonna see some examples of this in a little bit to put ways to include code or reference and sort of make your code more dry by not repeating things. So an include reference is a file and you need to pass in any variables. There's a subtle difference between using an include and then losing an embed. So an embed directly embeds the file in the template and he uses the same variables. There's more subtleties to that, which is explained in the chapter three article. It's at the bottom there, but that's kind of the basic of it is that you use an embed if you want to use the same variables that are in that template file and an include you have to pass in the variables that that template is expecting. And I'll show a couple of different examples of that in a little bit. So you can kind of see what the difference might be and what you might use that in different situations. Include tends to be useful in really component-based thinning techniques where you're using a component that might expect different values depending on where it's coming, where it's being used. Block and embed is a little bit different. It's a little bit of an inverse. It kind of finds a section of a template that can then be overwritten by child templates. So this is an example from the standard block template from class that you're stable would use and I'll show you that template as well. So it's kind of defining a section of that template. Everything else in that template is gonna stay the same. That is, child template is only able to override that section that's defined in the block. And debugging. Debugging, you can just debug directly in twig. You can dump, that's the twig's default or if you have develop and kint module installed, you can kint and open your field values there and get it right in the template where you are. So that's another great way to use twig. And that's all the slides I really have. We're gonna actually switch over to looking at some code. So this is, I think, a page template file from class C, I believe, yes. So you can see we have all the variables at the top that this template knows about. There's a lot of standard things like whether it's the front page, whether the person is long-tint or not. So you can use those in conditionals. And this template is pretty simple. There's not a lot of complicated stuff going on. We're just gonna output the regions in the page template file. This might be the first thing you do when you're creating a new theme is change around the regions and put in different wrappers in there. So this is just outputting the regions that are defined by class C. We have a couple of if statements. There's an if statement. If there's something in the page sidebar first, it's gonna put a wrapper around there and then it'll put the value. And then we don't get any stray wrappers lying around when they're not being used. So that's really about it for class C's page template file. And here's class C's node template. And we saw this class's array earlier. Again, at the top, there's a huge long list of all these variables that this template knows about. It's gonna set the classes as an array. It's a variable. So we have things like the little squiggly where it's combining the words node type with the node bundle with a clean class to create a class that's added. It's doing a little inline conditional. If it's promoted, then add the node promoted. Whoever uses that. But it's part of default. Things that have always been part of Drupal. Whether it's promoted or sticky and node is published or unpublished. If there's a view mode, this is this little snippet that I just showed earlier. If there's a view mode, add that as a clean class. And it's attaching the library. So we looked at that earlier as well. It's attaching the node class C slash node library just when this template file is in use. And here is where those classes are gonna be added. So attributes have some special methods that you can add class, you can remove classes. And there's different ways to use that. So this is where the classes are just output as the array there. Then it's outputting the title prefix if it's not the page. So that's pretty standard Drupal. If it's a different view mode, if it's a teaser or whatever, it's gonna output the title with the title attributes in the URL. Here's another conditional. If display submitted is set and that's a variable that's mentioned in the comments up above. Then this is all the standard Drupal defaults. Footer stuff, here's translation. So we can do a translation as a block. It's gonna translate the submitted by. And this translation block is good for when you're kind of passing in variables to a translation statement. It's gonna submit it by, then it's gonna use the author name there. So that's Classies No Template. I'm gonna show you a website that we just launched last week. And this is a site that looks pretty basic. It's something that was actually originally developed by someone who wasn't super experienced with Drupal. So we took it over about a year ago, migrated it to Drupal 8, some remnants lying around from the original development. And it's a kind of standard Drupal-ish kind of site. It's got articles, they have comments. You can log in and use some flags and different things like that. So it's got all these submitted lines. The client wanted these to open in a new window, which I didn't argue about, but we have a little hover that I'm gonna show you how that's done in Twig to say that this opens in a new window. And we're hoping to get a new logo and a new look sometime. And it's a good way to work on the site, iteratively, it's just kind of a basic looking theme. And then the client gets an idea of how he wants things to work exactly. So I'm gonna show you some of these node templates that are used for this front page. And there's three different view modes here. You can see this is what I call a mini teaser over here. And then there's a bigger, I think this is actually the teaser. And then there's a card view mode used for the down. Some of the card view modes in other sections have sharing links. And if you're logged in, there's some flags there as well. So it's a thing I didn't mention that it's a website for using information in the pharmaceutical industry. Our client actually has a pretty good following on LinkedIn. So he's expecting people to want to interact with his content here. So this is the node template for the card view mode. And it's the default for most of those view modes on the front page. And we're gonna use some set the classes. Again, I've stripped this down to remove some of those default classy things like whether it's sticky or promoted because we don't need that sort of thing. Keep it simple. And here we have an embed. So I think I didn't show over here is these open in a light box. And originally we had some more stuff here. We had sharing links. So we want it, this is actually opening a different view mode, which uses a module. And if I wish I remembered what it was called. But that's okay. So it's actually gonna embed that. It's the different view modes are using this light box trigger. So it's actually embedding that. And that template is here. So it's kind of got all these conditionals. There's videos content. There's some are PDFs, some are images. Sometimes if there's a PDF, there might be a default image that's uploaded to use in the teaser view. Anyway, so we have a whole bunch of conditionals here that say, if this other variable, which I've defined in a pre-process function is defined, then use this image. If not use, oh, this is actually interesting. This is passing in different image styles. So after a while, we realized that, oh, this view mode is gonna be the same as that view mode, but it's just gonna need to turn different image styles. It's gonna need the bigger image. And that's actually used further down on the homepage. And I didn't wanna start a whole new view mode and have to deal with all those display settings when really the only difference is that the image styles are a little bit bigger. And we can see that down here. So we have these card view modes, which is exactly the same as these ones, but these ones are a little bit bigger or should be a little bit bigger. So this is actually merging a different image style and that's another filter we can pass in. If we just wanna use different image style on this particular case, you can do that based on whatever conditionals you have. So it's merging the array, merging the image style to use the big card image style instead of whatever the default is. And then we have a bunch of other conditionals. If there's image, I think that's a bit of a legacy thing. This has changed around quite a bit. So I've got some stuff in here that might not actually be used anymore. If it's a video, then I'll put the video. Otherwise, this is a case where it's a PDF, I'll put the PDF unless there's an image, then use the image instead. So that was actually embedded here in the node template and it's actually using all the same variables that were available to the node template. It's just kind of embedding it so it can be reused in different ways. Then we have the usual stuff, I'll put the title prefix, don't delete the title prefix or suffix, that's where the contextual links go. I've had that problem where the contextual links go, why aren't they there? Oh, I deleted the title suffix. So this is a little bit of a conditional here if it's an external link and I have a bunch of conditionals in the theme file that figure out whether it should be showing an external link or not and this has to do with whether the client has added more content or not or if he just wants to go to the website where that content was originally from. And here we're actually using an include and it's passing variables from this template to the include. So it's creating that little hover effect where you can mouse over and see, there it is, like a new window. So this is used in a couple of different ways and I wanna make sure that it's consistent and that it's seeing the same thing and it's opening in a new window and I don't need this bracket here. And it's gonna give it a class, new window parent and then we have some CSS in the background that's gonna trigger the little hover overlay so that users are warned and screen readers can tell that this is gonna open in a new window. So that one is passing in, as an include, it's passing in the label, which is the label, which is the title in this template file and the URL that it wants to go to, which is a field that's just set to show a plain URL. And otherwise, if it's not time to show an external link else, just output the label. Here we have the content without and there is a whole bunch of fields here that are gonna be rendered in that lightbox trigger in bed that we have. So we're gonna hide a whole bunch of stuff there and output it someplace else. It's always good to have that content all, even if I'm hiding almost everything, it's always good to have it there anyway just in case we decide to add something and remember wondering, why isn't that showing up? All right, here's a couple more in bed. So we have this node submitted and this is one of those things that appears in every view mode I wanted to appear consistently. It's gonna have the same kind of variables that are available in that node template. And this is the kind of thing like we saw in the Classes default display submitted. If display submitted, we're gonna have some author attributes, which might be handled by even different modules, might add to that. And as we saw on this site, we are using the source handle, the Twitter handle. So we actually want the attribution to link directly to the Twitter account. And that's something that the client wants to do to encourage social media interaction and that sort of thing. So it's actually gonna get the source handle out of the field. I didn't want the client to have to worry about generating a Twitter link or finding the Twitter link, or if it's all gonna be the same. So we're just gonna get the field value, which is a field with taxonomy actually in this case, since he references a lot of the same sources over and over again. So it's gonna get the plain text value of that. And then the plain text value is actually gonna include the at symbol. That's how he's entered it. So it's gonna be at heat informatics, his handle, or at whatever your handle is. So I wanted to take out the at symbol and what's the easiest way to do that. This is a neat little thing. It's actually an array slice. So I'm gonna set the Twitter URL to twitter.com slash the source handle minus that at symbol. And I believe that's in the twig documentation on Sensea Labs, where you can see how some of this stuff works. And then it's gonna link that into new window. So this is a different way that it's using that include and I'm passing in different variables to the same include template. It's gonna include link new window. With the label is the source handle and the URL is the Twitter URL. So now I'm passing different variables to an included template rather than using an embed which expects the same variables. And then we have another conditional if that has this date added which is got custom date fields which is the published date of the article that he's referencing not necessarily the date that the article was updated. So I wanna print that date if it's there and if not, it's gonna print the default uploaded date. So here we said to set a little value variable to reset the date variable that's already there into the field value. So that is that whole node teaser. We have another embed at the bottom which is gonna embed the social links and it has socials and just socials and a flag like but I've had other template files which I'll look at in a minute where that might be referenced in different ways or laid out in different ways. So we keep that consistent, keep the wrapper consistent whatever classes around there are consistent. So that file is actually mostly embeds right there. So here's the full template, no template version of the same content and this one is the same sort of thing it's setting classes, it's adding the classes in the main wrapper article element. We're gonna use the content without and this is a case where some articles have an actual body content where there's some stuff here that he's written and we were gonna put the social links over here with the image. Other cases this isn't there and we just wanted to render the social links right away. So we have a couple of conditionals that are gonna do that. If there's no body then just put the socials right there otherwise they're gonna be further down with the image. Is there anything interesting here? So let's go to the block template and this is what shows you where the block and extends work which is a little bit differently from the includes. So here's a standard block template from Classy and it's gonna set the classes like we've seen already. It's gonna have the title prefix and if there's the label of the title then output that and then there's this block content. So other templates can extend this keep the whole wrapper and the classes and the title prefix and suffix the same but just allow that template to extend this section. And an example is the default block system branding block which is your title and logo and everything like that. And this all used to be if you remember in Drupal 7 this whole bit was embedded in a default page template file which was really annoying because you just have to take it all out because you probably just want the logo and not all the site name and stuff like that it just takes up space. And really in this case he's ever gonna show a title on a system branding block but okay it shows you how this works and it's a good example of how you might be able to use this. I actually don't use this very much myself I've only found a particularly good use for blocks and extends but it's something you'd come across in these block templates so it's worth knowing about and maybe you might find a good way to use it. So this is gonna get the full wrapper from the block template. It has this extends at the top it extends block.html.twig it has the block content here and it's just gonna put that in the block section in the block template. And then there's all this stuff about if there's a site slogan or a site name and things like that. So here's another interesting one. In this site we have, I'll show you on this case I'm not, this one I am logged in and on this article I see there's no comments either first. So I added a little bit of extra usability here to show okay there's no comments yet what happens when there's no comments versus when there are comments especially if you're not logged in because if you're not logged in you don't see the comment form and I wanted to have this there's no comments yet so create an account and log in and then we're actually using Drupal comments here so far the site just launched last week so I don't think there are any comments yet we'll see how it goes. I think it's useful valuable to have the content as part of the site and not using yet another third party service especially with this client and he's somewhat web savvy but I didn't really want to send him into some other thing especially if users have to log in anyway and we're expecting them to be fairly well behaved. So what we have is a template file and it took me a while to kind of figure out what Drupal is doing here and what to do if the comments are closed or if the comments are open and things like that so we have if the comment status is open or there are already comments then we're gonna print this otherwise you get an empty div so we don't want an empty div there we want to make sure that there are actually comments enabled on this now before we start printing stuff and then we have the usual kind of title prefix title suffix, I'll put that if there are already comments then we're gonna output them otherwise if there's a comment form which means the user is logged in and has access to comments then we're gonna say no comments yet be the first, translate that otherwise if comments are open there's no comments this means the user is not logged in they don't have access to comments they have to log in in order to do anything so then we're gonna get the path to user.register which is a system route we're gonna get the path to user.login these are standard pages they don't need any parameters like a note ID or whatever and then we're actually gonna open this in a modal so this is a kind of cool thing that you can do directly in Drupal 8 if you have a jQuery just make sure the jQuery UI library is enabled in that library that's accessible to this page and then we can just really easily make something open making any link open in a modal so we're gonna translate this section yet no comments yet we have to add the class useAJAX say it's modal add this path that we just created up here the link to the user.register page and then it's gonna set a bunch of dialogue options for this modal there's a bunch of stuff there another or log in and create an account modal variables we want it the same width and height and then when we're not logged in oops that's the one where I am logged in we can create an account there's my modal with my new account form it's gotten all rid of all site template-y stuff or log in there it is standard login form so it's really easy to do and then finally in this template if the comments form there we're gonna form is there that means they're logged in they have access to different comments and it's enabled on this node then in the field template we can look at looping and this is pretty complicated stuff in a field template I think this is from Classy so anyway this is actually setting two variables for classes it's setting the classes on the field wrapper and setting the title classes so title classes can do the same sort of thing about add classes or you can remove classes there if you want where's the loop, there it is so if there's multiple items then we're gonna output them as a list I think this is actually a custom one that I did to put multiple items as a list so four items in items it's gonna output them as a list and end the loop so it's pretty easy that way and then you can do things with keys in there too if you need to another loop if there's not multiple items you're just gonna put it in a div wrapper and then there's the rest of the conditional if the label is hidden, else do this same kind of thing this could have actually made use of some embeds or includes then it gets a little bit more complicated too which is always a decision to make you're adding a bunch of includes and then you get spaghetti and you wonder where that's... everything's going, everything's spinning together so this is the last template we can look at and this is the menu template with macros I don't really understand macros very well at first and I haven't really come across a good way to use them but this is a great example on the menu template so it's creating the menu links and this is gonna keep going and recalling itself so the menu is called... the macro is called menu links it's wrapped around here and then it's calling itself again after it starts outputting all these menu levels and menu items it's setting classes inside a loop so this is setting that right just inside this loop and then it's gonna call that macro again menu menu links it's passing a bunch of parameters to that so it'll just keep going as long as you have menu levels that it's set to so that's all actually I had to go through and I hope it made some sense does anyone have any questions? yes is there any advantage to using includes over embeds? well it's really about... the question was is there an advantage to using includes over embeds and it's actually depends on what you're expecting in that include or embed what variables you're expecting so the embed is gonna get the same variables that you have in the template that you embedded in and that's all it's gonna know about if you need to pass a different variables because you're using it in from different template files that have different things and even something like using something from a common template or a no template is a little bit different because I think the no template uses author but the comment template uses the user so you might want to put that in the same way but the variables are called something different before it gets to that template so that's kind of the main distinction in the documentation link that I had here there's a really good article at the bottom from chapter 3 and she really goes into a lot of detail about the distinctions between them and there's a lot more kind of subtleties and different things that you can use within beds and there's things like you can't use the same include twice in the same template but you can do that within beds so there's some little indoor idiosyncrasies like that as well yes no yeah this is a twig plugin for Adam I just remembered speaking of debugging we can actually look at what happens when we can't debug something so this is let me make sure I'm looking at one that we're actually using that one so I don't know let's say we want to check what variables are available in our content array we can just can't content go to where I'm logged in and there I'm going to get it this is a flexbox or grid display so it's putting it in a weird place but there it is so then I can just get everything right where I am in the template file and you don't have to be hopping around to you know put something in a theme preprocessor or whatever it is to debug yes I have a question for that I was going to ask so that your thing is an auto loading set it in your like in your services file in your services file yeah I got the debugging to work so it's the right file but all of my developers have things in their captions yeah yeah and it should be made clear that you also find it happens is sometimes the file when it composes your updates if everything's updated that developed services file is back to not having it in there so double checking and then we can paste it into the system oh sure yeah I didn't really go into stuff like sorry the question was about making sure that twig debugging is on which I didn't really go into in this case about how to make sure that development services is on and that your twig files aren't getting cached so uh there's my development services so what you need to do if you want to make sure that your twig files aren't getting cached on every load is to make sure that you're using in development services and in development settings in your development environment and then you can just set these parameters right in here and it'll make sure that you don't have to clear a cache every time that you want to make a change to a twig file and there's instructions somewhere on Drupal.org about how to do this but as I was saying to Nick sometimes this has gotten reset on me when I've done an updated Drupal so we're just talking about how to make sure that it's always going to make sure that it's reloading and you don't have to clear a cache any other questions? so the question was can an embed change a parent's variable and I actually haven't tried to do that to see what happens if you change it in the embed that would be interesting to see what happens we can try it this one you know let's do it in there okay we'll just set this might choke because it's not in a way yeah that didn't do anything so no I don't think you can change it or accidentally change it any other questions? so if that variable is a question about that was a question about the inline conditionals in the setting you know view mode if there is a view mode so that's actually checking if there is a view mode then output that class and Liam was asking what happens if it's not there it's just going to do nothing yes I don't think that matters there's also another interesting thing that you might see somewhere and let me see if I can find it in between the item attributes yeah that's just going to print it out so I think that's fine one thing you might see is something like if I can find one it might be something like this actually I better find one sorry I can't find an example there's a way to strip extra spacing around an element but I can't actually find an example there's something you might see in the default templates especially in class C where it's stripping out extra spaces okay any other questions here's a views template this is a kind of screen forward default views view templates so we can do lots of things with altering views templates which is a lot easier than it used to be I think so it's set in classes like it did before this is embedding this is where I'm doing some stuff to fix whether views titles link somewhere or not just kind of inconsistent and it's got all the standard view stuff if there's a view header output if there's exposed filters to add all these attachments before you might find a case where you want to move these things around and change the order of the header and the attachments and things like that yes we have some time that shows pre-process functions sure there's one that we came across which was a custom variable which I was looking at whether things were external links or not and that's in this one is from the heat informatics website this is a conditional if it's an external link so we'll look in my pre-process function which I've never got around to getting my editor to automatically recognize adult theme file as a HP file so here's my no pre-process node function so if you're not a PHP developer it might seem like a lot of difficult code but it's actually pretty easy to learn this bit by bit and look for examples online and slowly get to do more development and get out of the template and a little bit more and you can really do a lot of cool stuff from here so this one is that view mode where there are some human that need a bigger image style and this is actually dependent on the view and these two views I just want to send it a bigger image style this is a bit tricky to get but once I've figured it got and actually has the view that this is displayed in as part of the variables in the pre-process function find out what the view display is and then if it's in these couple of views and it's this view display then I'm going to use this set this variable to use the big card style and I actually use that in this embed where it says if use big start card style and then you can just use that like any other variables if you have a passcode and pre-process function you can just output it like any other variables that are accessible to the template and it acts like any other variables that are there so I'm just adding to the array here and add a variable use big card style this is stuff that's not even in use anymore and this is all this conditional though whether we're going to open an external link or not if there's a flag that it's featured then or if it has a video or if it has a file, a PDF embed or otherwise that link that external link field is empty then I'm going to use say it's an internal link which I don't even think I use that variable sometimes and otherwise if that field visit this website I didn't call it that it's one of these legacy things where we have these weird field value and content type things because somebody long ago decided to call it that and so here's this variables external link it's true so now it's accessible to the node template and again this is in the node template then I can just use it like any other variable in the node template if it's an external link that's custom then I'd include that's all submitted by that open a new window line okay any other questions or comments? Okay so I guess we have about seven minutes to the next session starts so thank you all for coming and I'm glad so many people are still interested in doing the tweaking and everyone hasn't gone on to using all the jobs but putting some fancy things like that