[TYPO3-templavoila] RFC: empty 'SECTION' in TV FCEs
bedlamhotelnospam at gnospammail.com
Tue Sep 26 20:57:44 CEST 2006
This is a fairly minor issue, but I don't think it can currently be
solved in TV/TYPO3. My question is what, if anything, can or should be
done about it.
TV has the (incredible) ability to enable editors to add a variable
number of items to a given part of an FCE by mapping the parent item as
a 'section'. TV also provides a method for wrapping the /entire/
'section', namely by mapping it using the 'inner' mode.
Unfortunately, unlike for example, '.wrap' on a COA, the wraps persist
when the element is empty. In many cases, e.g. where the mapped element
is a div, this presents no problems. But it's often logical and
convenient to markup up a list of zero or more items as...a list! The
result is that in cases where there are zero items, the parent list
element is left on the page. This is a (minor) problem from the point of
view of validation (i.e. since a ul or ol with no child li is invalid),
but is a worse problem from the point of view of CSS (i.e. in cases
where a list needs styles on the ul/ol, and these styles appear even
when there are no items).
It's not possible to solve this problem in any way that I can think of
because in typoscript, it's not possible to wrap the section, only the
constituent parts of it.
So my general question for users of TV is, "is this a problem others are
encountering?" and my question for anyone with a detailed understanding
of TV (Dmitry?) is "is this a problem that could be addressed without
having to drastically revise the extension?"
More information about the TYPO3-project-templavoila