cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
|
Available view plugins for Cutelyst that render output. More...
Classes | |
class | Cutelyst::CuteleeView |
A view that renders templates using Cutelee engine. More... | |
class | Cutelyst::ViewEmail |
A view that sends stash data via e-mail. More... | |
class | Cutelyst::ViewEmailTemplate |
A view that renders stash data using another view and sends it via e-mail. More... | |
class | Cutelyst::ViewJson |
A view that returns stash data in JSON format. More... | |
View plugins for Cutelyst are subclasses of View and render output for displaying or serving to the user agent. They can for example render HTML pages using template engines like Cutelee or create and sending e-mails or return JSON data.
Cutelyst already ships with different views that most easily can by called by the RenderView action when already registered in your reimplementation of Application::init(). You can create different views distinguished by names that can be load for different areas of your application. You can for example use a CuteleeView for your HTML website routes and a ViewJson for your API routes.
Adding a view with an empty name makes it the default view. Everywhere where no view name is explicitely specified, the default view will be used.
Views should be registered in your reimplementation of Application::init(). You can specify names for your views when registering them that can be used to load different views for different parts of your application. A nameless view would be the default view for your application.
Later in your code you can use the RenderView action to load the views.