Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 uid=1(daemon) gid=1(daemon) grupos=1(daemon) Safe-mode: OFF (not secure) /opt/lampp/lib/php/doc/HTML_Template_Sigma/docs/templates/ drwxr-xr-x | |
| Viewing file: Select action/file-type: Σtemplate example 4: callbacks1. Using callbacks for minor presentation changesHere we use callback function to iterate between two background colors of table cells. The beauty of this example is that all the logic to select the needed color is contained in the script, while the colors themselves are inside the template. Note also that the callback is called only once per parse() call, that's because all of the calls are identical.
2. Using callbacks for i18nYou can plug in any kind of i18n solution as a callback for 'func_translate'. Note that all the messages are contained in the template and can be edited without touching scripts. {language}
3. Shorthand for callbacks, built-in callbacksA common problem is to output the same variable, but encoded/processed in different ways. The shorthand {var:callback} for callback functions and default callbacks 'h', 'u' and 'j' were added specifically to address this. |
:: Command execute :: | |
--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.5382 ]-- |