rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Mars on December 16, 2007, 12:16:49 AM
-
{{!user}}
[special:strings]
user=Logged User
work correctly
{{!user}}
[special:strings]
{{load|/strings.txt}}
strings.txt:
user=Logged User
EOF
{{!user}} seems to be estimated before the load of the external file {{load|strings.txt}} containing the corresponding value 'user=Logged User'
While the same load placed in the part body of the main page works correctly
-
macros are executed when needed.
when the tpl is loaded, no macro is executed.
[special:strings] is expected to be a table, and no macro is called when hfs accesses it.
-
somewhere, when a tpl is loaded all %symbol% are replaced in template, we can considere that {{!name}} ask information from special section or it will be possible to extend the macro {{!name}} in an external file or text like
{{!name|url%lang%.txt}}
not necessary to write
[special:string]
{{switch|%lang%
|fr|{{load|/languages/fr.lng}}
|..|.....................................
|en|{{load|/languages/en.lng}}
}}
[/specail]
no {{load}} is needed and only what you want is loaded from the external file
file
example
if name exits in to [special:string] and not in the external file then {{!name|url%lang%.txt}} works as {{!name}}
QUESTION : I d'ont see if {{!name}} is case sensitive?
-
it is not sensitive AFAIK
in the while i created this solution (much more generic)
www.rejetto.com/forum/?topic=5349.msg1031223#msg1031223