-
Dispatching & URLs
Overview Vanilla has 3 primary ways of dispatching URLs and they are tried in the following order. Routes registered with Garden\Web\Dispatcher. Pages using Gdn_Dispatcher. Redirects from Gdn_Router. Garden\Web\Dispatcher Routes There are primarily 2 types of routes dispatched from Garden\Web\Dispatcher.…
-
Creating Pages & Controllers
Looking to create routes containing some UI and content? This is the article for you! Differences from Gdn_Controller A PageDispatchController serves a different purpose to a Gdn_Controller. PageDispatchController Core static master view only. Primary views expected to be rendered in React. Server side rendering only of…
-
Route Management & Redirects
Route management allows you to create custom urls to specific pages within your Vanilla 2 installation. It also comes with some pre-defined default values. Pre-defined Routes There are four pre-defined routes that have special meaning. They are: DefaultController - This is the main page to load when the root url of your…
-
The Request Object
Vanilla’s base Controller class (the class from which all controllers are extended) accepts a DeliveryType parameter on every request. Depending on the type of delivery being requested, a controller in Garden will deliver all of a page, part of a page, or part of a page plus extra information as JSON. DeliveryType There…
-
Permission Checking
Vanilla uses permissions to restrict access to particular content, options, or workflows. There are a number of functions built into the framework to do this efficiently. We eschew role-detection as a means of access control. For example, we would never check to make sure someone was in a role named Moderator before…