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 : 42 - 37 = ?

 
 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!