Author Topic: assigning some inner template content to a main template?  (Read 1419 times)

0 Members and 1 Guest are viewing this topic.

Offline danf.1979

  • Newbie
  • *
  • Posts: 2
assigning some inner template content to a main template?
on: Tue, 06. November 2007 - 23:53:13
Hi, my name is Daniel and I am just getting to know VlibTemplate. It seems like I could use it, but I havent found any example on how to do something like this:

1) Set main_template.tpl
2) Set inner_template.tpl
3) Assign vars to inner_template.tpl or main_template.tpl
4) Render

main_template.tpl

Code: [Select]
<html>
<header></header>
<body>
<tmpl_var name="inner_template">
</body>
</html>

inner_template.tpl

Code: [Select]
<table>
<tr>
<td>something here</td>
</tr>
</table>


The idea is to assign the inner_template content to the main_template. Can this be done with Vlib? If yes, could someone provide a simple example on how to do so?

The result Im after is:

Code: [Select]
<html>
<header></header>
<body>
<table>
<tr>
<td>something here</td>
</tr>
</table>

</body>
</html>

Many thanks!
Last Edit: Wed, 07. November 2007 - 00:25:17 by ClausVB

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de