Reputation: 777
I'm updating a project from TYPO3
I'm already on 8.7 and now working on the extensions. We have a pibase extension where the support should be still available in 8.7.
I've refactored a few things already:
Another task will be to rework the templates from css_styled_content
to fluid_styled_content
. But I'm not right there because I'm stuck to get the plugin to be available in Template>RootPage>Info/Modify>Edit-whole-template>Includes
. It's just not in the "available items" list.
I thought there are 2 steps to get this done.
Register the plugin for frontend rendering with
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'pi1/class.tx_rxextkey_pi1.php', '_pi1', 'list_type', FALSE);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'pi2/class.tx_rxextkey_pi2.php', '_pi1', 'list_type', FALSE);
and make the plugin selectable in the backend with
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
array('LLL:EXT:rx_extkey/Resources/Private/Language/locallang_db.xml:tt_content.list_type_pi1',
'rx_extkey_pi1',
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('rx_extkey') . 'ext_icon.png'
),
'list_type',
'rx_extkey'
);
Here is how the extension/plugin is structured generally:
myextension
- configuration/
- TCA/
- Overrides/
tt_content.php
- doc/
wizard_form.dat
wizard_form.html
- eId/
classX.php
classO.php
classL.php
- pi1/
class.tx_myextension_pi1.php
flexform_ds.xml
locallang.xml
- pi2/
class.tx_myextension_pi1.php
flexform_ds.xml
locallang.xml
- res/
something.html
somethingelse.html
ext_emconf.php
ext_icon.gif
ext_localconf.php
ext_tables.php
locallang_db.xml
so inside the ext_localconf
, I call addPItoST43 from the ExtensionManagementUtility
to actually add the class files
the emconf is just "default" so to speak and a description of the plugin
the file ext_tables.php
is empty now because all the stuff from in there moved to the Configuration/ part
The parts I moved to tt_content.php
inside the Configuration/ directory contain 2 TCA Overrides with $GLOBALS['TCA']['tt_content']['types'] and $GLOBALS['TCA']['tt_content']['columns'] followed by 3 addPlugin calls also from the ExtensionManagementUtility
So with all this done I still can't include the plugin within the root page to get the actual functionality - I have no idea how to further process to get this to work - any help is much appreciated, if any further information or code is needed just drop a comment.
further investigation: So I have debugged like every part of the extension and the part for the backend seems to work just fine, I see the plugin content and can select pieces out of the database to theoretically display in the frontend.
The only thing is that TYPO3 never comes into my class tx_extkey_pi1
to actually fill the template with content - I have var_dumps()
with exit()
in both main()
and renderTemplate()
but they get never triggered.
Upvotes: 1
Views: 808
Reputation: 101
Ich think this part
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
array('LLL:EXT:rx_extkey/Resources/Private/Language/locallang_db.xml:tt_content.list_type_pi1',
'rx_extkey_pi1',
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('rx_extkey') . 'ext_icon.png'
),
'list_type',
'rx_extkey'
);
belongs in ext_tables.php
Upvotes: 0