Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use mustache Sections? #734

Open
rsousacode opened this issue Jan 2, 2024 · 1 comment
Open

How to use mustache Sections? #734

rsousacode opened this issue Jan 2, 2024 · 1 comment
Labels
question Issue can be closed by providing information

Comments

@rsousacode
Copy link

I would like to re-use html templates like the header. Is it possible to do with Crow?

Here they talk about those sections https://jgonggrijp.gitlab.io/wontache/mustache.5.html

I tried this but it renders the string, and doesn't go into html

  auto header = crow::mustache::load_text("header.html");
  ctx["header"] = header;
  

  auto page = crow::mustache::load("index.html");
  return crow::response(200, page.render(ctx));
@gittiver gittiver added the question Issue can be closed by providing information label Jan 3, 2024
@mrozigor
Copy link
Member

My site is old, but maybe it will be helpful -> https://github.com/mrozigor/mrozigor.net/blob/master/src/controllers/MainController.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issue can be closed by providing information
Projects
None yet
Development

No branches or pull requests

3 participants