我該如何將參數傳遞給啓用flux的控制器才能被控制器操作識別?如何使用FluidTypo3將參數傳遞給控制器操作?
我使用構建器創建了一個擴展,並將以下方法添加到ContentController。
/**
* @param string $var
*/
public function exampleAction($var = null) {
var_dump($var);
die;
}
但無論如何將該參數添加到URL,我只會得到「null」作爲結果。
擴展名目錄是「測試」,所以是$_EXTKEY
。對於registerProviderExtensionKey()的調用,構建器將「Mac.Test」放入ext_tables.php
。所以在URL我試過這些參數:
http://host/index.php?id=1&tx_test_content[var]=abc
http://host/index.php?id=1&tx_test[var]=abc
http://host/index.php?id=1&tx_mactest_content[var]=abc
http://host/index.php?id=1&tx_mactest[var]=abc
http://host/index.php?id=1&var=abc
和其他一些。但無濟於事。
我試圖與f:link.action
視圖助手,導致
http://localhost/test2/index.php?id=1&no_cache=1&tx_test_content[member]=foo&tx_test_content[action]=example&tx_test_content[controller]=Content
而且$這個 - >請求 - > getArguments()只返回一個空數組,所以必須有一些嚴重的錯誤。
二手版本:
PHP 5.6.11
TYPO3 6.2.21
VHS 2.4.0
通量7.2.3
fluidpages 3.3.1
fluidcontent 4.3.3
fluidcontent_core 1.3.0
構建器1.0.0
沒有其他安裝(新系統僅用於測試此行爲)。
這是一個超高速緩存控制器動作?如果是,那麼它可能不會在意基於先前執行的任何參數。 – sven
您可以在'ext_localconf.php'和'\ TYPO3 \ CMS \ Extbase \ Utility \ ExtensionUtility :: registerPlugin()'中將調用發佈到'\ TYPO3 \ CMS \ Extbase \ Utility \ ExtensionUtility :: configurePlugin() ext_tables.php'?插件名稱對參數名稱很重要。 – Jost
不,不幸的是,我不能,因爲我使用FluidTYPO3(也稱爲助焊劑)。因此ext_tables.php/ext_localconf.php中沒有插件配置。或者我應該在這種情況下呢?我在任何地方都沒有看到任何關於它的提及。 –