From a1099bba79077c1258e586e2e2cbfe0094f10118 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Wed, 15 May 2013 11:40:28 -0500 Subject: Testing the template_context_prerender hook This allows for modifying any context *right before render*, including access to the variables that are passed in. This test takes advantage of that and takes one of the variables, "doubleme", and modifies it (doubles it!) In our case it turns "happy" and "joy" into "happyhappy" and "joyjoy". This commit sponsored by Mark Holmquist. Thank you! --- .../testplugins/modify_context/templates/contextplugin/general.html | 1 + .../testplugins/modify_context/templates/contextplugin/specific.html | 1 + 2 files changed, 2 insertions(+) (limited to 'mediagoblin/tests/testplugins/modify_context/templates') diff --git a/mediagoblin/tests/testplugins/modify_context/templates/contextplugin/general.html b/mediagoblin/tests/testplugins/modify_context/templates/contextplugin/general.html index 7b7261c6..9cf96d3e 100644 --- a/mediagoblin/tests/testplugins/modify_context/templates/contextplugin/general.html +++ b/mediagoblin/tests/testplugins/modify_context/templates/contextplugin/general.html @@ -2,3 +2,4 @@ General page! global thing: {{ global_append }} lol: {{ lol }} +doubleme: {{ doubleme }} diff --git a/mediagoblin/tests/testplugins/modify_context/templates/contextplugin/specific.html b/mediagoblin/tests/testplugins/modify_context/templates/contextplugin/specific.html index 25bea3e2..5b1b4c4a 100644 --- a/mediagoblin/tests/testplugins/modify_context/templates/contextplugin/specific.html +++ b/mediagoblin/tests/testplugins/modify_context/templates/contextplugin/specific.html @@ -3,3 +3,4 @@ Specific page! specific thing: {{ specific_page_append }} global thing: {{ global_append }} something: {{ something }} +doubleme: {{ doubleme }} -- cgit v1.2.3