[Neos] RFC: Simplify templates and reduce auto-generated HTML

Bastian Waidelich bastian at typo3.org
Mon Nov 25 14:50:44 CET 2013

Aske Ertmann wrote:

Hi again ;)

>> 2. Neos automagically generates a lot of wrapping elements and attributes
>> to the content, even in "live" workspace

> The second one has now been taken care of.

Well, partly (it's already so much better!). But we still add a tag. 
This means every CE gets a wrapping element. This will probably be fine 
for a large majority, but not for all.

> I think everybody is +10 about making the editable view helper simpler,
> so we should just to ahead a do that regardless of the rest.

Ok, that's a good point. I'll try to split that apart from my changeset 
and push it separately.

> Regarding getting rid of the contentElement view helper, that's where we
> need to discuss and make sure it's  the right path because it has many implications.
> E.g. the class is now not automatically generated anymore, is this a good thing or
> should we try to just  make it configurable if desired?

I would be really interested in the experience of others. But for me the 
first thing I usually do when I start a TYPO3 CMS project is disabling 
the millions of stdWraps creating wrapping divs, classes, ids and such 
in order to reduce the markup to the minimum and in order to add better 
semantics to the generated HTML code.

Configuration options are always an issue, but I would expect it to work 
the other way around: Create a minimum by default and make it easy to 
tweak the system so that it adds stuff you need.

> It's the same regarding removing the automatically generated id. This is something
> I'm in favor of doing because it allows for linking directly to specific content.

Same thing (IMO). Is it really useful to be able to link to the second 
column in a three-column container?
I'd suggest to add a little TS processor that can turn
<h2>This is a headline</h2>
<h2 id="this-is-a-headline">This is a headline</h2>

and (possibly) activate it for Headlines and Text elements by default.

Or at least make it explicit by adding
<div id="c{node.identifier}"...
to the templates so that the integrator can adjust this behavior by 
editing them.

> Preferably by on/off so one doesn't have to modify all templates to achieve it.
> This speaks in favor of doing with a TypoScript processor/configuration.

Just read this now - I think we agree on this one ;)

> Then there's the whole automatic finding the first tag and adding attributes to it,
> which I'm fine with as long as we test it thoroughly.

I already did some tests and it works fine. And in any case it would 
fall back to a wrapping tag whenever something unexpected happens (in 
user workspace).

> I think the best way forward is to have a hangout with those who have good knowledge
> about all the areas. This is probably too complicated and long for our usual discussion meeting,
> so maybe a group of 4-5 could get together in a hangout for an hour and see if we can agree on a
> solution and propose it to the list. I'd be happy to join in on that next week if possible.

Yes, great, let's do this! I'm available any time during the days.

Bastian Waidelich

More information about the Neos mailing list