aboutsummaryrefslogtreecommitdiff
path: root/examples/template-demo/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/template-demo/main.c')
-rw-r--r--examples/template-demo/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/template-demo/main.c b/examples/template-demo/main.c
index 2adbb52..9989a68 100644
--- a/examples/template-demo/main.c
+++ b/examples/template-demo/main.c
@@ -26,6 +26,10 @@ int templating_handler(UrlParams *params) {
context_set(&ctx, "safe_html", "This is <b>bold</b> and <i>italic</i> HTML.");
context_set(&ctx, "unsafe_html", "<script>alert(0);");
+ context_set(&ctx, "user_logged_in", "true");
+ context_set(&ctx, "role", "admin");
+ context_set(&ctx, "status", "active");
+
char *features[] = {"Fast and Lightweight", "Simple API",
"Basic Routing", "Templating Engine",
"Static File Serving", "Cookie Management"};