|
Темплет в темплете???
|
|||
---|---|---|---|
#18+
Почему не получается вставить темплет в темплет? main.tpl.htm <html> <table border> <tr> <!-- BEGIN row --><td> {DATA} </td><!-- END row --> </tr> </table> </html> main1.tpl.htm <html> <!-- BEGIN cell1 --> <table border bordercolor="#FFFF00" bgcolor="#00FFFF" width="100%" height="62"> <tr> <td> {DATA1} </td> </tr> </table><!-- END cell1 --> </html> index.php <?php require_once "IT.php"; $tpl = new HTML_Template_IT("templates"); $tpl1 = new HTML_Template_IT("templates"); $tpl->loadTemplatefile("main.tpl.htm", true, true); $tpl1->loadTemplatefile("main1.tpl.htm", true, true); $cel="Hello World"; $tpl->setCurrentBlock("row"); $tpl->setVariable("DATA", $cel); $tpl->parseCurrentBlock("row"); $tpl1->setCurrentBlock("cell1"); $t=$tpl->show(); $tpl1->setVariable("DATA1", $t); $tpl1->parseCurrentBlock("cell1"); $tpl1->show(); ?> В результате работы в броузер выводит так <html> <table border> <tr> <td> Hello World </td> </tr> </table> </html> А как сделать чтоб было так??? <table border bordercolor="#FFFF00" bgcolor="#00FFFF" width="139%" height="62"> <tr> <td> <table border> <tr> <td> Hello World </td> </tr> </table> </td> </tr> </table> ... |
|||
:
Нравится:
Не нравится:
|
|||
19.03.2004, 14:35 |
|
|
start [/forum/topic.php?fid=23&fpage=516&tid=1479945]: |
0ms |
get settings: |
11ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
47ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
30ms |
get tp. blocked users: |
2ms |
others: | 264ms |
total: | 393ms |
0 / 0 |