Home » HTML » HTML_Template_Flexy » Bug #7483
subtemplating support
Details
| 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) |
Comments
[2006-04-25 10:56 UTC] anil at m3 dot net
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
[2006-09-08 12:39 UTC] monique dot szpak at m3 dot net
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