Issue Bug Closed

#89850Fluid Styled Content Layout ignores sectionIndex setting

Jo Hasenau 12/04/19, 22:17 updated 07/24/24, 16:26

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

Reviews 0

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

History 4

  1. Jo Hasenau changed description 12/04/19, 22:19

  2. Riccardo De Contardi commented 03/02/20, 22:56

    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?

  3. Georg Ringer commented 09/26/20, 12:55

    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

  4. Garvin Hicking commented and changed status New Closed 07/24/24, 16:26

    We want to close this issue due to several reasons:

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