Date: 10/23/00
- Next message: layne <email protected>: "RE: [phplib] Nested Blocks Question"
- Previous message: Markus Wagner: "[phplib] Bug in template.inc (PHPLIB) ?"
- Next in thread: layne <email protected>: "RE: [phplib] Nested Blocks Question"
- Maybe reply: layne <email protected>: "RE: [phplib] Nested Blocks Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm just learning PHPLib & Templates, and I'm struggling a
bit with a nested block. I found in the archives a post by
Layne Weathers
(http://lists.netuse.de//phplib/0004/0326.html) on the
subject that helped get the basic structure correct, but now
I'm getting an error "Template Error: loadfile: BkRow is not
a valid handle" when I try to set "BkRow" to "". Commenting
out the noted line prevents the error, but causes the
contents to go rather crazy. I've only included the template
related code, and since the template works when the line is
commented out (just with WAY to much data) I did not include
the template file. Let me know if you need more detail.
TIA!
Mike
~~~~~~~~~~~~~~~
$t = new Template();
$t->set_file ("template", "SearchResults.tmpl");
$t->set_block ("template", "BkRow", "BkRow");
$t->set_block ("template", "EdRow", "EdRow");
for ($idx = 0; $idx < $count; ++$idx)
{
while ($edition =mysql_fetch_array ($result_ed))
{
while ($book = mysql_fetch_array ($bkresult))
{
...
$t->set_var("copy", $copy);
$t->parse ("BkRow", "BkRow", true);
}
....
$t->set_var("title", $title);
$t->parse("EdRow", "EdRow", true);
$t->set_var("BkRow",""); <-----
This line causes the error
}
}
$t->pparse("output", "template");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: layne <email protected>: "RE: [phplib] Nested Blocks Question"
- Previous message: Markus Wagner: "[phplib] Bug in template.inc (PHPLIB) ?"
- Next in thread: layne <email protected>: "RE: [phplib] Nested Blocks Question"
- Maybe reply: layne <email protected>: "RE: [phplib] Nested Blocks Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

