Skip to content

OUT_SNIPPET

Jurek Muszyński edited this page Mar 28, 2024 · 4 revisions

void OUT_SNIPPET(const char *name)

Description

Writes snippet, that is content read from the file in snippets directory, to output buffer. It is a hybrid solution, allowing mixed – partly rendered, partly static – content in one server response.

Returns

None

Example

void render_about()
{
    header();   // dynamically render header
    OUT_SNIPPET("about.html");  // static part
    footer();   // dynamically render footer
}

Clone this wiki locally