2015-12-23 164 views
-1

我使用TYPO3 v7.6.2! 創建自定義擴展。 由於控制器可以選擇一個模板來生成?默認情況下,選擇name_template = name_action。TYPO3擴展中的模板

+2

AHM ......而究竟是你的問題? –

+0

「name_template = name_action」意味着您需要針對您的操作使用不同的視圖?或者如果你可以更詳細地描述你的問題,那麼其他人可以幫助你。 –

回答

0

謝謝你,我找到了我的問題的答案。 爲了對同一個擴展使用不同的模板,只需要在你需要的頁面上調整typoscript路徑中資源的路徑。

常量:

plugin.tx_plugin { 
    view { 
    templateRootPath = fileadmin/tx_plugin/you_custom_template 
    partialRootPath = fileadmin/tx_plugin/you_custom_partial 
    layoutRootPath = fileadmin/tx_plugin/you_custom_layout 
    } 
} 

和設置:

plugin.tx_plugin { 
    view { 
    templateRootPaths.0 = {$plugin.tx_plugin.view.templateRootPath} 
    partialRootPaths.0 = {$plugin.tx_plugin.view.partialRootPath} 
    layoutRootPaths.0 = {$plugin.tx_plugin.view.layoutRootPath} 
    } 
} 
+0

您能否將您的解決方案標記爲正確答案,謝謝! –