Example #1
0
void test_controller::index(mvcpp::context::ptr ctx)
{
    mvcpp::view& templ = ctx->get_template();
    auto t = ctx->get_view("test");
    auto tm = time(NULL);
    t["TIJD"] = std::string(asctime(localtime(&tm)));
    templ.subview("SUBVIEW") = t;
}
Example #2
0
 virtual void initialize_default_template(mvcpp::context::ptr ctx) override
 {
     ctx->get_template().subview("MENU") = ctx->get_view("_menu");
     ctx->get_template()["TITLE"] = "i++ | Customizable customers and invoicing system";
 }