Project

General

Profile

Actions

Bug #89850

closed

Fluid Styled Content Layout ignores sectionIndex setting

Added by Jo Hasenau over 4 years ago. Updated 2 days ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Fluid Styled Content
Target version:
Start date:
2019-12-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Depending on the setting of the frame_class field, Fluid Styled Content renders two different variants of ids/anchors.

With a frame it will be

<div id="c{data.uid}" class="frame frame-{data.frame_class} frame-type-{data.CType} frame-layout-{data.layout}{f:if(condition: data.space_before_class, then: ' frame-space-before-{data.space_before_class}')}{f:if(condition: data.space_after_class, then: ' frame-space-after-{data.space_after_class}')}">
    <f:if condition="{data._LOCALIZED_UID}">
        <a id="c{data._LOCALIZED_UID}"></a>
    </f:if>
    ....
</div>

without a frame it will be

<a id="c{data.uid}"></a>
<f:if condition="{data._LOCALIZED_UID}">
    <a id="c{data._LOCALIZED_UID}"></a>
</f:if>

In the first case there will be just one additional <a> Tag, in the second there will be two.
Both of them should be removed as soon as the field sectionIndex ("Show in section menus") is disabled, since otherwise those anchors will break the HTML code by adding unwanted tags.
Currently the switch has no impact and the tags will always be there in CMS 8, 9 and 10.

Actions #1

Updated by Jo Hasenau over 4 years ago

  • Description updated (diff)
Actions #2

Updated by Riccardo De Contardi over 4 years ago

Is there a reason not to write something like (I hope the inline notation is correct):

with frame:

<div id="{f:if(condition: data._LOCALIZED_UID, then: 'c{data._LOCALIZED_UID}', else: 'c{data.uid}')}" class="frame frame-{data.frame_class} frame-type-{data.CType} frame-layout-{data.layout}{f:if(condition: data.space_before_class, then: ' frame-space-before-{data.space_before_class}')}{f:if(condition: data.space_after_class, then: ' frame-space-after-{data.space_after_class}')}">

without frame:

<a id="{f:if(condition: data._LOCALIZED_UID, then: 'c{data._LOCALIZED_UID}', else: 'c{data.uid}')}"></a>

or am I missing something?

Actions #3

Updated by Georg Ringer almost 4 years ago

even if the section index is removed, it must be still possible to use anchor links from other areas to those content elements, therefore removing the whole <a>-tag is for sure not an option

Actions #4

Updated by Garvin Hicking 2 days ago

  • Status changed from New to Closed

We want to close this issue due to several reasons:

  • It is quite old and didn't gain further traction, and we want to try to consolidate our issue tracker some more
  • FSC can be customized or adapted like Riccardo outlined
  • Duplicate <a id> tags can be seen as a "compatibility" feature and shouldn't affect output too much; using CSS one could also specifically hide them, if they are responsible for layout shifts
  • Changing anything in FSC at this point might be a moot point due to content-blocks probably getting used instead in the future (where adaptation is even easier, at least to plan)
  • The field "sectionIndex" is originally intended to be applicable to built menus, so just because it gets disabled may not mean that removing anchor ids from the FSC output would be the intended behaviour for everybody, so this could even load to breaking changes for some usage scenarios

I hope this reasoning is okay for you too, otherwise please let us know to see how to continue with this!

Actions

Also available in: Atom PDF