MovableType plugin to handle the localized scope variables

Posted by
piroli
at
Feb 24 2008 12:15
Trackbacks
Trackbacks (0)
Post Comment
Post a comment
Category
Plugin

LocalBlock plugin enables you to give the localized scope to the variables in template. The modifications to the localized scope variables in the specified block are limited in then and revoked after leaving the block. So they will have less dependence and more utilized.

Post to your del.icio.us

After installing plugin into your MT, you can use <MTLocalBlock> block tag. <MTLocalBlock> tag makes a block to localize the scope of the variables.

Download

LocalBlock

Tag Reference

MTLocalBlock
Localize the scope of all variables in this block. All variables are carried over the block, but modifications and new declaratons in the block will be revoked after leaving the block, and do not affect the variables of the outer block. If you need to refer the modifications of the variables in the block, you can specify globals option.
globals
You can specify the variable name to handle as global variables with the regular expressions.
  • globals="^foo$" ... "foo" is global.
  • globals="^g_.+$" ... all variables started with "g_” are global.