Feature #25282
closeduid of content Element should be wrappt into wrapping div not prepended a-Element
0%
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)
Updated by Thomas Deinhamer over 13 years ago
- Target version deleted (
0)
That's a good one. I'd prefer this to
be used in a new CSS Styled Content version,
maybe also capable of rendering HTML5 content.
Updated by Steffen Gebert over 13 years ago
- Complexity set to easy
- TYPO3 Version set to 4.6
Updated by Thomas Deinhamer over 13 years ago
Implemented here:
http://forge.typo3.org/projects/extension-hype_html5/repository/
Updated by Alexander Opitz about 10 years ago
- Status changed from New to Needs Feedback
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.4)?
Updated by Sigfried Arnold about 10 years ago
Hello,
this issue is resolved, but exists in a different form now.
in the default language, the div gets its ID inside as suggested, but it acts bit weird in different langauges
currently, localized records get the ID of the translation original put into the content elements div, but are preceeded by an additional anchor-element with its actual id
since section links from backend are pointed to the actual ID, the translation original is pretty useless - this should be the other way around with an additional option to remove the translation original id completely and create the links (definied in BE) directly to the actual ID
best regards
Updated by Alexander Opitz about 10 years ago
Can you please open a new issue for that problem? With TS example and what happens and what you expect to happen? I would close this issue to keep clean and don't mix a resolved and a new problem. :)
Updated by Sigfried Arnold about 10 years ago
of course - i try to figure out what happens exactly at the moment and open a new issue it is applicable
this can be closed
Updated by Alexander Opitz about 10 years ago
- Status changed from Needs Feedback to Closed
Thanks for feedback.