0
以下结构:Symfony的1.4路径模块
apps/backend/
apps/frontend/
modules/
account/template/_menu.php
account/template/test.php
settings/template/indexSuccess.php
我做包括_menu在用下面的代码test.php的:
<?php slot('menu'); ?>
<?php include(dirname(__FILE__).'/_menu.php') ; ?>
<?php end_slot() ?>
我怎么能包括indexSuccess文件_menu.php。 PHP的? 谢谢!
贡纳尔
您不需要,Symfony会在/ apps/app_name/templates(全局)或/ apps/app_name/modules/module_name/templates中的其中一个位置查找。所以你需要做的是确保你的部分(用'_'表示)位于这两个位置之一。 – 2012-02-25 18:17:22
你有工作吗? – 2012-02-25 22:10:36
是的,我做到了!谢谢! – craphunter 2012-02-27 23:18:29