Project

General

Profile

Actions

Feature #25282

closed

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

Added by Sigfried Arnold over 13 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-03-08
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

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 = <div id="c{field:_LOCALIZED_UID}"
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 id="c1"></section

is much more semantic than

<a id="c1" />
<div>
foo
</div>
(issue imported from #M17895)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #26776: Add a separate "CSS Styled content" with support for HTML5 Closed2011-05-12

Actions
Actions

Also available in: Atom PDF