Customizing the Master Template - HL Vanilla Community
<main> <article class="userContent"> <p>See the documentation on Twig.</p><div class="js-embed embedResponsive" data-embedjson="{"body":"For most of Vanilla's existence, themes have been able to specify a \"master view\" or template for a site, generally located at my-theme\/views\/default.master.tpl. This was the full template that the page would get rendered in. Today, Vanilla offers a newer, twig templating system for creating theme layouts. Rather than…","photoUrl":"https:\/\/us.v-cdn.net\/6030677\/uploads\/947\/TM5DAO1BWY5V.png","url":"https:\/\/success.vanillaforums.com\/kb\/articles\/270-using-a-twig-master-view","embedType":"link","name":"Using a Twig Master View - Vanilla Success"}"> <a href="https://success.vanillaforums.com/kb/articles/270-using-a-twig-master-view" rel="nofollow noreferrer ugc"> https://success.vanillaforums.com/kb/articles/270-using-a-twig-master-view </a> </div><div class="js-embed embedResponsive" data-embedjson="{"body":"Built In Twig Functions Twig comes with some built-in functions and filters that can be useful when creating view templates. The most common include: Default Values The |default and |default(\"Default Value\") filters apply some default value when used with a null value. A common use case is safely accessing some variable…","photoUrl":"https:\/\/us.v-cdn.net\/6030677\/uploads\/947\/TM5DAO1BWY5V.png","url":"https:\/\/success.vanillaforums.com\/kb\/articles\/265-common-twig-functions","embedType":"link","name":"Common Twig Functions - Vanilla Success"}"> <a href="https://success.vanillaforums.com/kb/articles/265-common-twig-functions" rel="nofollow noreferrer ugc"> https://success.vanillaforums.com/kb/articles/265-common-twig-functions </a> </div><div class="js-embed embedResponsive" data-embedjson="{"body":"Here are a few simple tips to get the most out of Twig views. Handling null or undefined values In development, Twig will give fatal errors when accessing an undefined value. This is to make the developer more aware of the content being injected into their view, and to more easily identify typos. In production these will…","photoUrl":"https:\/\/us.v-cdn.net\/6030677\/uploads\/947\/TM5DAO1BWY5V.png","url":"https:\/\/success.vanillaforums.com\/kb\/articles\/267-twig-tips-tricks","embedType":"link","name":"Twig Tips & Tricks - Vanilla Success"}"> <a href="https://success.vanillaforums.com/kb/articles/267-twig-tips-tricks" rel="nofollow noreferrer ugc"> https://success.vanillaforums.com/kb/articles/267-twig-tips-tricks </a> </div><p><br></p> </article> </main>