Issue Feature Closed

#25282uid of content Element should be wrappt into wrapping div not prepended a-Element

Sigfried Arnold 03/08/11, 16:12 updated 09/16/14, 08:57

Description

Since every content element should be considered as “section” while outlining a document its confusing that anchors for those sections are not inside those elements but outside them.

Also if you interact with JavaScript/DOM and you count content elements you have more nodes than content elements.

Solution: 1) wrap the prefixed anchor into the wrapping div element or even better 2) place the uid of the content element as id attribute directly to the div element.

This TypoScript Setup places the id attribute direclty into a wrapping div element for each content element (and the translated version for the translated records)

tt_content.stdWrap {
innerWrap.cObject {
default {
10 {
override.cObject >
override.cObject = TEXT
override.cObject {
value =

if.isTrue.field = _LOCALIZED_UID
}
}
}
}
prepend >
}

for further compatiblity with HTML5 this div element can simply be renamed to section (if config.doctype is set to html_5) – since it will help the outlining process:

</section

is much more semantic than



foo

(issue imported from #M17895)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.