[Cppcms-users] Multiple class of render()
Brought to you by:
artyom-beilis
From: Christian G. <chr...@gm...> - 2012-06-20 14:35:13
|
Hi all, I found an interesting jquery lib, which speeds up page switching a lot. This seems to solve my performance problems I have on my embedded device. Have a loot at it: https://github.com/defunkt/jquery-pjax I have replaced all calls of render with ajax_render, which looks like: void Base::ajax_render(std::string template_name, cppcms::base_content &content) { bool chromeless = false; if (request().getenv("HTTP_X_PJAX") == "true") { chromeless = true; } BOOSTER_DEBUG("ajax_render") << "chromeless: " << chromeless; if (chromeless) { render(template_name, content); } else { static content::master m; render("header", m); render(template_name, content); // as a template for footer is an overkill, we do it here response().out() << " </div>\n"; response().out() << "</body>\n"; response().out() << "</html>\n"; } } Is the usage of multiple render class the best solution? thanks -- Christian Gmeiner, MSc |