Re: [phplib] IT[X] example From: Bertrand Mansion (bmansion <email protected>)
Date: 07/31/01

Iwan,

I have identfied some problems and a way to fix your script.

1. get rid of header in your second template file as you want to include it
in a template which already has an header.

2. get rid of block declaration in your second template file because your
second template file will be inserted as a new block.

When you type :
$tpl->addBlockfile( "CONTENTS", "block_contents", "contents.inc.htm" );

It says to the template engine that the variable CONTENTS becomes the block
block_contents, containing the content of your second template file.

3. This is a problem I will have a look at this weekend as I don't have the
time now. It is a problem in ITX. To be able to parse the block_contents,
your second template files should have variables in it. Then values should
be assigned to these variables using setVariable after
setCurrentBlock('block_contents')

I think ITX was not intended to be used to include html files (without
variables). Use include() or readfile() instead.

Good luck

Bertrand Mansion
Mamasam

-- 
Abbestellen mit Mail an:   phplib-unsubscribe <email protected>
Kommandoliste mit Mail an: phplib-help <email protected>