2013-02-11 25 views
0

你好,我有這樣的結構在我的網站:如何包括文件夾TPL文件之上智者

templates 

.orderpages 
..domain.tpl 

.nextgen_clean 
..root.tpl 

而且在我想包括domain.tpl文件root.tpl,只有我的$ template_dir模板總是從PHP頁面文件夾中讓我怎麼回去一個文件夾,因爲{包括文件=」 ../等}不起作用。

我希望有人可以提供幫助。

回答

0

定義它像下面

$file_to_show="page_request.tpl"; 
$smarty->assign("file_to_show", $file_to_show); 

現在第三方物流文件顯示變量

{include file=$file_to_show} 

,也從TPL您直接包括像下面

{include file=page.tpl} 
+0

我在哪裏可以把PHP文件? – 2013-02-11 10:03:22

相關問題