For those of you using PHP's Flexy (Pear HTML_Template_Flexy) templating engine, this patch provides better subtemplating support. Adds a new 'partial' tag to the flexy:xxx namespace and allows for variable mapping. The word 'partial' is borrowed from the ERB templating engine (ruby). You can define variables in the subtemplate context as attributes of the new tag. This feature is pretty important for modularising templates. Usage example:


<flexy:partial src="subtemplate.html" varNameInSubtemplateScope1="#String Literal#" 
varNameInSubtemplateScope2="currentPage.var" varNameInSubtemplateScope3="var" />

My changes were made in PHP 5.0.4 on Flexy v1.2.1.

Add the function linked here to Compiler/Flexy/Flexy.php to get the 'partial' tag working. I'll see if the project integrates this feature in the future.

hey dude - hope all is going well at last.fm - guess what, they finally included your partial tag support in flexy - congrats :-)

http://pear.php.net/package/HTML_Template_Flexy/download/1.2.5/