Simplify Language Picker
authorJason Stephenson <jstephenson@cwmars.org>
Mon, 3 Jan 2022 19:08:28 +0000 (14:08 -0500)
committerJason Stephenson <jason@sigio.com>
Tue, 17 Jan 2023 20:27:26 +0000 (15:27 -0500)
Remove the BLOCK from the getformurl macro in the ecard/lang.tt2
template.

Remove erroneous '=' and replace with '-' to have TT2 consume
whitespace.  I think the = was a PHP hangover or something.

Open-ILS/src/templates/opac/ecard/lang.tt2

index ff33f2a..76673ff 100644 (file)
@@ -1,17 +1,15 @@
-[%=
-MACRO getformurl(lang, name) BLOCK;
-    IF ctx.ecard.lang == lang;
-       name;
-    ELSE;
-        path = '/eg/opac/ecard/form';
-        IF lang != "en";
-            path = path _ "_" _ lang;
-        END;
-        url = '<a href="' _ path _ '">' _ name _ '</a>';
-        url;
+[%-
+MACRO getformurl(lang, name)
+IF ctx.ecard.lang == lang;
+   name;
+ELSE;
+    path = '/eg/opac/ecard/form';
+    IF lang != "en";
+        path = path _ "_" _ lang;
     END;
+    '<a href="' _ path _ '">' _ name _ '</a>';
 END;
-=%]
+-%]
 <p>
 (
 [% getformurl('en', 'English') %] |