[TYPO3] Optional elements in FCE

Michael Niemann xml.transformator at yahoo.com
Thu Jun 5 08:36:20 CEST 2008


Hello,

taken a simple HTML template for an FCE like this:

<div>
    <h3 id="headline"><!-- This headline should be optional--></h3>
    <span><!-- This text is always there --></span>
</div>

There seems to be no good solution to make the headline optional. If I leave it blank empty h3 tags will be rendered. A workaround would be to set the mapping so that the tags are overwritten and then add the h3's through TypoScript. Obviously this is against the use of a templating system. It migh be suitable for some exceptional cases but if you have a lot of FCEs with a lot of optional fields you could use a frontend plugin as well.

Another workaround is to create a section and have the user insert the fields in the backend. Besides horrible usability one could add multiple fields of the same kind.

I've either overseen a way of solving this or this is a major design flaw of TemplaVoila as this usecase is very common and some CMS do feature it.

Of course one would need to put markers into the html template and a checkbox would be required in the backend but is there more to this?

This is definately a criteria wether to chose T3 for a project were content elements with a lot of optional fields are required. Creating or I would end up creating 10 FCEs instead of one just because some fields are optional.

Thanks for any comments. I'm still hoping to have missed a good solution to this issue.

regards
Michael

       


More information about the TYPO3-english mailing list