For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > January 2005 > Template inside template









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Template inside template
HarryG

2005-01-08, 3:58 pm

Hi

I want to have an index.php which is contructed by four templates

index.tpl
menu.tpl
content.tpl
footer.tpl

Now in my index.php I will have some variables that will be assigned and displayed directly via index.tpl whereas other parts of the index.tpl will be constructed with the other three templates.

include 'menu.php' (will have something like $MenuPage->display(menu.tpl))
include 'content.php' ( and $Content->display(content.tpl) and so on...)
include 'footer.php'

$Mypage->display(index.tpl)

Is this possible? any hints or samples would be great.
Thanks
HarryG
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com