MovableType plugin to handle the localized scope variables

Posted by
Posted at
2008/02/24 12:15
関連記事 (0)
Post Comment
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.

この記事を Delicious に追加する   このエントリーをはてなブックマークに追加  

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



Tag Reference

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.
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.