Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smichaelsen/typo3-fluid-contentelements
Extension to simply register new Content Element types rendered with fluid
https://github.com/smichaelsen/typo3-fluid-contentelements
Last synced: about 2 months ago
JSON representation
Extension to simply register new Content Element types rendered with fluid
- Host: GitHub
- URL: https://github.com/smichaelsen/typo3-fluid-contentelements
- Owner: smichaelsen
- Created: 2015-03-10T21:19:15.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-18T10:45:57.000Z (almost 10 years ago)
- Last Synced: 2024-04-24T03:14:55.996Z (9 months ago)
- Language: PHP
- Size: 167 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fluid Content Elements
## TYPO3 ExtensionA handy way to create new TYPO3 content elements.
### Why?
[Fluid Powered TYPO3](https://fluidtypo3.org/) is great and very powerful and if some day if have understood it fully and have read the [documentation](https://fluidtypo3.org/documentation/templating-manual/introduction.html) 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`:
```php
\AppZap\FluidContentelements\ContentElement::addContentElementTyposcript($_EXTKEY, 'My New Element');
```In your `ext_tables.php`:
```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 your `ext_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`). If `true` TYPO3 renders the header field with `lib.stdheader`.#### `registerContentElement()`
Parameters:
* `$extensionKey`: See above
* `$title`: See above
* `$showItemList`: The *showitem* configuration for the new element. Refer to the [TCAReference](http://docs.typo3.org/typo3cms/TCAReference/Reference/Types/Index.html#showitem) 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 element
* `tx_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`