Create a free account to get access to additional free training videos. Enjoy this free video from CraftQuest! Create a free account to get access to additional free training videos. Join the Community

Flexible Twig Templates in Craft 3

Testing the Template Stack

All of our work pays off as we add a new section to the site and see the flexible template stack react and work its magic!

Now that we have our site built, let’s demon­strate the addi­tion­al pow­er of using this tem­plate stack. This set­up has the effect of being able to very quick­ly get a new sec­tion of the site up and run­ning with­out a ton of configuration.

Let’s say we want­ed to add a new Sec­tion to the site that han­dled book reviews about NASA, space, space mis­sions, and space exploration. 

If we added this as a new entry type to our exist­ing Blog sec­tion then it would just work because of the con­fig­u­ra­tion and nam­ing con­ven­tion we used for the tem­plates. If we want­ed a spe­cial lay­out for the new entry type we would only have to cre­ate the new template.

But let’s go ahead and cre­ate an entire­ly new sec­tion of the site called Review. This sec­tion will house all book reviews that the team wants to pub­lish to the site.

Flexible Twig Templates in Craft 3 is made up of the following videos: