Discussion:
[TYPO3-english] has no rendering definition!
HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
2016-03-15 12:07:54 UTC
Permalink
Hi,

In my first attempt creating a custom CE as explained in this article: http://t3-developer.com/typo3-installation/typo3-anpassen/eigene-contentelemente-in-typo3-erstellen/
I’m experiencing some problems.
I managed to install my created test extension and I can add the new CE from the plugins-tab into my page. Only the added CE has no possibilities to add an image or anything else? Also viewing the page in the FE i get: ERROR: Content Element type “my_extension_teaser” has no rendering definition!

So I am missing something, can’t figure out what and how. Any advise how to proceed? Thanks in advance.

Using Typo3 7.6.1

Regards,
HocomAdvies



Wiechert Hooghwinkel
www.hocom-advies.nl
Philipp Gampe
2016-03-15 20:49:39 UTC
Permalink
Hi Wiechert,

HocomAdvies [ 🌷 Wiechert Hooghwinkel ] wrote:

Please fix your name to something meaningful.
Post by HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
ERROR: Content Element type “my_extension_teaser” has no rendering
definition!
So I am missing something, can’t figure out what and how. Any advise how
to proceed? Thanks in advance.
You need to add the rendering definition to your TypoScript template. This
is explained in the article below the headline:
Das Rendering für die Frontendausgabe

Best regards
--
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Certified Integrator – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!
HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
2016-03-16 09:29:35 UTC
Permalink
Thanks for you’re reply. Now I’m only struggling with the rendering part :)
Post by Philipp Gampe
Hi Wiechert,
Please fix your name to something meaningful.
Post by HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
ERROR: Content Element type “my_extension_teaser” has no rendering
definition!
So I am missing something, can’t figure out what and how. Any advise how
to proceed? Thanks in advance.
You need to add the rendering definition to your TypoScript template. This
Das Rendering für die Frontendausgabe
Ok I did all as explained there, but than I still get the mentioned error in the FE.

So what should I have instead of this part? {namespace ce = MyVender\MyExtension\ViewHelpers} ??





Using a meaningful name [‘teaser”] made the wizard work (I had “my_extension" as name).
$TCA[‘tt_content']['types']['teaser']['showitem'] = "
In other extensions I see the file TCA/Overrides/tt_content.php while in the example the TCA overwrite settings are in ext_tables.php?


So now I only have left the rendering which is not working.

Regards,
HocomAdvies


Wiechert Hooghwinkel
www.hocom-advies.nl
Post by Philipp Gampe
Best regards
--
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Certified Integrator – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!
_______________________________________________
TYPO3-english mailing list
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
2016-03-16 19:16:28 UTC
Permalink
Hi,

I stil did not figure out how to get the right rendering definition in the template.

This is what the sample says to include: {namespace ce = MyVender\MyExtension\ViewHelpers}

I tried this <div xmlns:f=“http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers”>fluid here </div>

But still no rendering. How to get this working? Or where to read more about how to do this?

Thanks.

Regards,
HocomAdvies

Wiechert Hooghwinkel
Post by HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
Thanks for you’re reply. Now I’m only struggling with the rendering part :)
Post by Philipp Gampe
Hi Wiechert,
Please fix your name to something meaningful.
Post by HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
ERROR: Content Element type “my_extension_teaser” has no rendering
definition!
So I am missing something, can’t figure out what and how. Any advise how
to proceed? Thanks in advance.
You need to add the rendering definition to your TypoScript template. This
Das Rendering für die Frontendausgabe
Ok I did all as explained there, but than I still get the mentioned error in the FE.
So what should I have instead of this part? {namespace ce = MyVender\MyExtension\ViewHelpers} ??
Using a meaningful name [‘teaser”] made the wizard work (I had “my_extension" as name).
$TCA[‘tt_content']['types']['teaser']['showitem'] = "
In other extensions I see the file TCA/Overrides/tt_content.php while in the example the TCA overwrite settings are in ext_tables.php?
So now I only have left the rendering which is not working.
Regards,
HocomAdvies
Wiechert Hooghwinkel
www.hocom-advies.nl
Post by Philipp Gampe
Best regards
--
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Certified Integrator – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!
_______________________________________________
TYPO3-english mailing list
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
_______________________________________________
TYPO3-english mailing list
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Urs Braem
2016-03-16 20:05:12 UTC
Permalink
Hi Wiechert

Here's more: http://stackoverflow.com/questions/32993534/with-fluid-styled-content-how-to-create-custom-content-elements-in-typo3-7-5

Actually, that stuff is too complex for me. I need to be able to create and modify custom CEs quickly.
Then I found mask https://typo3.org/extensions/repository/view/mask
It's very nice!

Cheers
Urs
Urs Braem
2016-03-16 20:08:27 UTC
Permalink
Ah, I see Daniel has published more on this subject. Check out https://usetypo3.com/custom-fsc-element.html as well
HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
2016-03-17 11:26:57 UTC
Permalink
Hi I have seen these topics as well but still not clear how to get my sample working. The mask extension looks interesting. Only minor thing is, that it is not reusable (like the extension CE are).
So I prefer to figure out how to get his working :) So if someone can explain a bit more that would be nice.

Wiechert
Post by Philipp Gampe
Hi Wiechert
Here's more: http://stackoverflow.com/questions/32993534/with-fluid-styled-content-how-to-create-custom-content-elements-in-typo3-7-5
Actually, that stuff is too complex for me. I need to be able to create and modify custom CEs quickly.
Then I found mask https://typo3.org/extensions/repository/view/mask
It's very nice!
Cheers
Urs
_______________________________________________
TYPO3-english mailing list
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Jigal van Hemert
2016-03-17 14:02:05 UTC
Permalink
Hi,
Post by HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
Hi I have seen these topics as well but still not clear how to get my sample working. The mask extension looks interesting. Only minor thing is, that it is not reusable (like the extension CE are).
So I prefer to figure out how to get his working :) So if someone can explain a bit more that would be nice.
EXT:sitepackage is still only for 6.2, but I must find time to finish
the version for 7 and upgrade the site too.
The manual of the extension is also on the website in separate pages and
explains the code in the sitepackage extension.

http://www.typo3coder.nl/sitepackage/custom-content-elements/the-slider-element/
Tells about a slider content element. The frontend rendering is actually
super simple; a few lines of TS with a Fluid template.

Most of the code also works with 7, a few changes are necessary or nice
for forward compatibility.
--
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org
HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
2016-03-22 14:45:19 UTC
Permalink
Hi,

I am stil struggling with the CE in an extension.
This is how the template looks like. It was giving the FE error: has no rendering definition.

{namespace ce = MyVender\MyExtension\ViewHelpers}

<ce:fal data="{data}">
<article class="caption">
<f:for each="{items}" as="image" iteration="iteration">
<f:image src="{image.uid}" title="{image.title}" alt="{image.alternative}" class="caption-media" treatIdAsReference="1" />
</f:for>
<div class="caption-overlay">
<h1 class="caption-overlay-title">{data.header}</h1>
<p class="caption-overlay-content">{data.bodytext}</p>
</div>
</article>
</ce:fal>
</div>

Since I am not sure what to put in the Viewhelper.php file? Is the path as mentioned just for reference, and do I replaced it with a path towards my extension’s viewhelper.php file?
{namespace ce =teaserfoto/Classes/ViewHelpers/FalViewHelper.php}

I just tried it with a copy of FalViewHelper.php from gitthub:
which I have in typo3conf/ext/teaserfoto/Classes/ViewHelpers/FalViewHelper.php

So when I use
{namespace ce = MyVender\MyExtension\ViewHelpers\FalViewHelper.php}
or
{namespace ce =teaserfoto/Classes/ViewHelpers/FalViewHelper.php}


Parts of the CE are visible (the data.header and data.bodytext) are rendered but still no image visible. Only the {namespace ce =teaserfoto/Classes/ViewHelpers/FalViewHelper.php} line is in the FE output? So it looks like the viewhelper is not used? Or I have no FAL image? Where can I see if something is done with the image at all?

Any help on this. Thanks

Best regards,
HocomAdvies

Wiechert
HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
2016-03-23 08:58:00 UTC
Permalink
Any advise how to get this working? How can I find out if a viewhelper is used (loaded)? And why does the viewhelper in my test setup not work?

Regards,
Wiechert
Post by HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
Hi,
I am stil struggling with the CE in an extension.
This is how the template looks like. It was giving the FE error: has no rendering definition.
{namespace ce = MyVender\MyExtension\ViewHelpers}
<ce:fal data="{data}">
<article class="caption">
<f:for each="{items}" as="image" iteration="iteration">
<f:image src="{image.uid}" title="{image.title}" alt="{image.alternative}" class="caption-media" treatIdAsReference="1" />
</f:for>
<div class="caption-overlay">
<h1 class="caption-overlay-title">{data.header}</h1>
<p class="caption-overlay-content">{data.bodytext}</p>
</div>
</article>
</ce:fal>
</div>
Since I am not sure what to put in the Viewhelper.php file? Is the path as mentioned just for reference, and do I replaced it with a path towards my extension’s viewhelper.php file?
{namespace ce =teaserfoto/Classes/ViewHelpers/FalViewHelper.php}
which I have in typo3conf/ext/teaserfoto/Classes/ViewHelpers/FalViewHelper.php
So when I use
{namespace ce = MyVender\MyExtension\ViewHelpers\FalViewHelper.php}
or
{namespace ce =teaserfoto/Classes/ViewHelpers/FalViewHelper.php}
Parts of the CE are visible (the data.header and data.bodytext) are rendered but still no image visible. Only the {namespace ce =teaserfoto/Classes/ViewHelpers/FalViewHelper.php} line is in the FE output? So it looks like the viewhelper is not used? Or I have no FAL image? Where can I see if something is done with the image at all?
Any help on this. Thanks
Best regards,
HocomAdvies
Wiechert
_______________________________________________
TYPO3-english mailing list
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Jigal van Hemert
2016-03-23 10:10:10 UTC
Permalink
Post by HocomAdvies [ 🌷 Wiechert Hooghwinkel ]
Any advise how to get this working? How can I find out if a viewhelper is used (loaded)? And why does the viewhelper in my test setup not work?
Very quick reply (short sentences, not meant to be rude!)

First of all, you show very little code for people to find the problem.

A few pointers:

- the error about the rendering configuration refers to missing
TypoScript. The article [1] that was mentioned shows what TypoScript is
needed. If this is problematic, please show your TypoScript

- you want to use a viewhelper for some reason, but you mention that you
have no idea what to put in the PHP file for that viewhelper. Do you
actually need a viewhelper? A viewhelper is only needed if you can't
solve a problem with standard Fluid and need some PHP code to do the job

- to display images you don't need a viewhelper. The standard
viewhelpers from Fluid (or the TYPO3 core) are perfectly capable of
rendering an image from FAL


[1] https://usetypo3.com/custom-fsc-element.html
--
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org
Continue reading on narkive:
Loading...