-
Using a Smarty Master View
Smarty Master View This master view acts as the wrapper for each page in your theme. Often, this is the only view you'll have to manipulate. The master view file is called the default.master.tpl (Smarty template) or the default.master.php. We recommend using Smarty templates for your master view, however you can decide to…
-
Smarty Overview
Smarty Overview Vanilla currently supports both PHP and Smarty views. Smarty is a template engine that allows dynamic content to be inserted into a HTML template using tags. These tags are wrapped in curly braces: {tag}, and can represent variables or the output of a function call. They are replaced when the page is…
-
Smarty Conditionals
Smarty includes a base amount of logic that you can insert into your template. One of these is a conditional statement. A couple of basic examples should give you an idea of the syntax and format of Smarty conditionals. This example uses the user data from the controller’s data array to print out a welcome message if the…
-
Smarty Functions
This section outlines all the Vanilla-specific Smarty functions made available for use in your Smarty templates. You are also able to use the built-in Smarty functions in your template. Function: {debug_vars} Opens up the Smarty debug console in a popup window. This will show you all of the data available to the smarty…
-
Smarty Modifiers
Smarty modifiers can be applied to variables, custom functions or strings. You can use a modifier by adding a | (pipe) after the element you wish to modify and adding the modifier name. Modifiers can also accept parameters which are separated by a : (colon). These parameters must follow the order of their appearance in the…