In the last lesson, what we did is we set up our labels in a template.
Now let's go ahead and use it.
In the last lesson I also mentioned, there are two options you can use.
And if you use the wrong one, it's going to be incredibly painful.
And the two options we have is template and include our best practice.
And I always do.
This is I always use include because it allows you to use of a helme functions.
You can use templates, but it doesn't allow you to do that soroban.
And having two things together I think is ten times easier just to use include all the time.
So let's go ahead and put this into practice so it makes more sense so we can get rid of this line here.
But note the indentation.
One, two, three, four.
Very important because this is where our labels are going to go.
And what we're going to need to do is intense it by four spaces.
So make our Conesa, we can put it on the same line.
And as always, let's put in a double curly braces.
We need to put in a dash now very, very important.
You need to remove the second one and you'll find out why very shortly.
So, again, here we have the two options we can even use template or we can use, include and include
will allow us to use the other Helme function, but allows us to indent.
You can't do this with template, so it makes more sense to always use include.
Next, we need to say what template or what part of a template do we want to include.
Now, as you can have multiple things in here, this defined label here and the name tells it what to
include as you can have multiple things inside.
That's what we have the name.
So in this case, we're going to use my labels.
And for whatever reason, if it doesn't work, is usually because there has been a misspelling and as
you can see here, of misspells it myself.
So let's go ahead and say this and just check that all matches.
Excellent.
Next, we need to include the context of where to paste a text because it's effectively what it's going
to do.
We would include is going to include the text and we need to tell it where to put it.
So in this case, we're going to use full stop to say right here, then we need to pass it into a function,
because if we leave it the way it is right now, what is going to do is put everything on a single line.
And this is going to give you a weird error about Jason to Yamal or Yamal to Jason conversion, because
what it will look like is something like this, which is invalid Yamal and invalid.
Jason, the come on we're going to use is called an indent, which stands for new line indentation where
we need to tell it how many lines to indent by.
As we saw before, App Engine X was invented by four spaces.
So we put forward.
And now if you're wondering why we didn't put the second dash in there, well, the purpose of that
dash is to tell Helm not to create a new line.
So it's a bit contradictory what we're trying to do here.
If we then put a dash in here, which would say create a new line followed by don't create a new line.
So by removing it, what it's going to do is take all the elements inside here in Denver by four spaces
and put each one on a new line.
So now let's go ahead and check this out.
Make sure to save a file, because if you go to a terminal and now let's run Helme templates, full
stop.
Excellent.
Let's make this bigger.
How awesome is that we can see a template in action, we have a labels, we have app location and front
end.
Next up, let me show you another really powerful way you can use templates.