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 #1

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.

Actions #2

Updated by Steffen Gebert over 13 years ago

  • Complexity set to easy
  • TYPO3 Version set to 4.6
Actions #4

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)?

Actions #5

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

Actions #6

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. :)

Actions #7

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

Actions #8

Updated by Alexander Opitz about 10 years ago

  • Status changed from Needs Feedback to Closed

Thanks for feedback.

Actions

Also available in: Atom PDF