Reputation: 91
I'm using the sitepackage builder to create website in Typo3 9.5. Right now i need to create a custom content element and i just can't get it to work.
I followed several tutorials, including the official doc (https://docs.typo3.org/typo3cms/extensions/fluid_styled_content/7.6/AddingYourOwnContentElements/Index.html) and it seems like there's always missing an obvious part i don't get. For example the first part in the doc "PageTsconfig", where exactly am i supposed to put this code?
If anyone can provide a dummy step by step manual to create and use a custom content element, it would be much appreciated.
Upvotes: 2
Views: 595
Reputation: 56
The Page TS Config Part goes for example into the page properties resources (Edit page in page tree). Usually you place this TS part into your custom extension and just add it as a file in the mentioned section. The Page TS Config for custom elements is responsible for displaying your content element options when clicking "Add new" content element on a page.
You can have a look at my extension at Github which is just a base content element "Text with image on left". There you should find all necessary steps in order to create your own content element. I have just adjusted the extension in order to have v9 compatibility. If any questions or you get stuck somewhere, just let me know.
https://github.com/paravista/custom_content_element
Another advice it to check out the mask extension and mask exporter extension. The generated exported code can also be a good source in order to see how it has been done here.
Upvotes: 1