Reputation: 2215
following situation: I will write a PlugIn that shows only content throw a extern API (i need a controller to execute my calls). And i can´t add this plugin via typoscript shown in this tutorial (in german): https://advitum.de/2013/05/einstieg-in-extbase-ein-plugin-ohne-models/. So i don´t need a full MVC Model but my solution wan´t work.
The whole proplem is i have no output in the frontend. The controller is never called.
Can everyone tell me how can i do this?
Ok I have to give to my question more information.
this is my ext_table.php:
if(!defined('TYPO3_MODE')) die('Access denied.');
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'MB.' . $_EXTKEY,
'MBTest',
'Show Test'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'MBTest');
my ext_localconf.php:
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'MB.' . $_EXTKEY,
'MBTest',
array(
'Static' => 'statistic',
),
);
my Controller:
namespace MB\Mbtest\Controller;
class StaticController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* action statistic
*
* @return void
*/
public function statisticAction()
{
\TYPO3\CMS\Extabse\Utility\DebuggerUtility::var_dump('hello');
$this->view->assign('testLIST', 'MBTest say Hello');
}
}
and i have also the standard typoscript files for the templates. My template (Statistic.html looks like this:
<f:layout name="Default" />
<f:section name="main">
<f:flashMessages />
<h1>Test</h1>
{listTEST}
</f:section>
[EDIT] Is there a another way to make call´s to my API via php and show the computed result in my template?
Upvotes: 0
Views: 886
Reputation: 1201
Dude. Check your spellings. You're assigning
$this->view->assign('testLIST', 'MBTest say Hello');
but then you want your template to render
{listTEST}
Upvotes: 2
Reputation: 605
Your first code sample is from 'ext_table.php'. Could it be a simple misspelling of 'ext_tables.php'?
Upvotes: 1