Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/share/doc/python-nevow/examples/macros/ drwxr-xr-x |
Viewing file: Select action/file-type: As you can see the macro has been expanded since you can see this message in the template inside the main div. Macros are expanded only during the first load at precompile time. Expanding a macro means that each macro marked tag is substituted with the result of a macro_somename call. In this case the result is this text. This is particularly useful when you want to create something alike MasterPage, or you want to dynamically load some code for different components of a page, but only one time. It may seem that macros solve the same problems that Fragments do, this is true but only to a certain degree. While Fragments are rendered each time, macros are only rendered once and before everything else. Use macros when you need to transform the main template once (or each time the main template changes on disk) |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0168 ]-- |