Closed
Bug 301861
Opened 19 years ago
Closed 19 years ago
Template::Plugin::Hook also needs an "include" method
Categories
(Bugzilla :: User Interface, enhancement)
Tracking
()
RESOLVED
INVALID
People
(Reporter: mkanat, Assigned: mkanat)
Details
When working on my hook in bug 301664, to modify field-descs.none.tmpl, I discovered that my hook couldn't modify anything in the current page. Of course, one of the entire purposes of hooking field-descs would be to modify the existing variables. :-) The Template::Plugin::include method does this quite nicely, so we need another method in addition to our "process" method in Hook, or we need to make our "process" method use "include."
Comment 1•19 years ago
|
||
"process" is designed to expose parent templates to changes in child templates, while "include" copies the variable context for the duration of the included template to insulate the parent template from changes made by its child. See this doc for more info: http://www.template-toolkit.org/docs/blue/Manual/Directives.html#Processing_Other_Template_Files_and_Blocks So we shouldn't need an include method, and in fact implementing one shouldn't fix the problem you ran into implementing that hook. We may need to dig a little deeper to figure out why your code wasn't able to modify existing variables in that file.
| Assignee | ||
Comment 2•19 years ago
|
||
Yeah, that's what I thought. But for some reason on the 2.20rc1 installation I was using, switching it to use "include" fixed things. I have no idea why. Maybe something weird about the Gentoo server I was using. Anyhow, this bug is essentially invalid, because there never was a bug.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•