Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.13

Request #7483 subtemplating support
Submitted: 2006-04-25 10:56 UTC
From: anil at m3 dot net Assigned: alan_k
Status: Closed Package: HTML_Template_Flexy
PHP Version: 5.0.4 OS: Linux Fedora Core 4
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 31 - 20 = ?

 
 [2006-04-25 10:56 UTC] anil at m3 dot net (anil)
Description: ------------ Similar to Request #4405, this patch provides better subtemplating support. Adds a new 'partial' tag to the flexy:xxx namespace and allows for variable mapping to the new template. The word 'partial' is borrowed from the <a href="http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html">ERB</a> 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. Changes were made on Flexy v1.2.1. Test script: --------------- Usage example: <flexy:partial src="subtemplate.html" varNameInSubtemplateScope1="#String Literal#" varNameInSubtemplateScope2="currentPage.varName" varNameInSubtemplateScope3="var" /> Changeset: A function is added to Compiler/Flexy/Flexy.php to handle the new flexy:partial tag. You can view the function here: http://www.quotesque.net/archives/HTML_Template_Flexy_Partial_Tag.txt

Comments

 [2006-09-08 12:39 UTC] monique dot szpak at m3 dot net (Monique)
flexy:ignore loses state when partial is parsed. This is probably correct behaviour but very confusing. You need to redeclare flexy:ignore="yes" at some place (a wrapper element) in the partial. Took us a while to figure that one out. :D
 [2006-09-11 03:52 UTC] alan_k (Alan Knowles)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/HTML_Template_Flexy please test and let me know if it works for you.