DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
Fluid Content Elements¶
TYPO3 Extension¶
A handy way to create new TYPO3 content elements.
Why?¶
Fluid Powered TYPO3 is great and very powerful and if some day if have understood it fully and have read the documentation I'll probably never use anything else anymore. But until then I'll stick with this handy little extension that let's you create new TYPO3 content elements (rendered by fluid) in no time.
How?¶
In your ext_localconf.php
:
\AppZap\FluidContentelements\ContentElement::addContentElementTyposcript($_EXTKEY, 'My New Element');
In your ext_tables.php
:
\AppZap\FluidContentelements\ContentElement::registerContentElement($_EXTKEY, 'My New Element');
In your TYPO3 extension create the following file Resources/Private/ContentElements/MyNewElement.html
to render your content element. (The file name is the name of the element without spaces).
This is the minimum setup to create a new content element called "My New Element".
Documentation¶
addContentElementTyposcript()
¶
Parameters:
$extensionKey
: Provide the key of the extension you create your content elements with (will be available as$_EXTKEY
in yourext_localconf.php
)$title
: The name of your new content element. Convention: Make it human readable (english) with uppercase first letters.- Do: Author Profile, Slider, Full Fledged Banner Ad
- Don't: content_element_1, some mysterious slider, Neues Inhaltselement
$standardHeader
: boolean (default:true
). Iftrue
TYPO3 renders the header field withlib.stdheader
.
registerContentElement()
¶
Parameters:
$extensionKey
: See above$title
: See above$showItemList
: The showitem configuration for the new element. Refer to the TCAReference for more information. By default the showitem configuration of the "Text with Image" element will be used.
Labels¶
You can localize your content element in the TYPO3 backend with the file Resources/Private/Language/locallang_contentelements.xlf
You can use the following keys:
tx_myext_my_new_element.title
: Name of the content elementtx_myext_my_new_element.description
: Description of the content element in the new content element wizard.
Icon¶
If you want add an icon file at: Resources/Public/Icons/ContentElements/MyNewElement.png