3. Static Blocks

Sometimes the re-expansion of embedded BMl might not be what you want. In that case, you can designate a block with a flag which will cause it to stop or limit the re-expansion of embedded calls.

3.1. Fully-Static Blocks

If you add the {S} flag to the block you're defining, the contents of it will not be re-evaluated afterward. This is mostly useful when you have blocks that you are sure will never contain BML to be expanded or properties to fill in, and you want to save the overhead of trying to re-evaluate them.

»

Example 1.14. Look file with {S} block


companyname=>{S}Spumco, Inc.

		

This defines the companyname block as static.

»

Example 1.15. BML File that calls the static block


<h1>Welcome to <?companyname companyname?></h1>

		

Combining the two yields:

»

Example 1.16. Example output


<h1>Welcome to Spumco, Inc.</h1>

		

3.2. Semi-static Blocks

Sometimes you want a block which fits somewhere between the fully-dynamic {D} blocks and the completely-static behavior of {S} blocks. Enter the {R} block flag, which expands pRoperties like those passed to a {D}, {F}, or {P} block, but doesn't expand BML that might be inserted by one of those.

»

Example 1.17. Look file with {R} block




		

»

Example 1.18. 

		  
		

»

Example 1.19. Example output