Issue Feature Under Review

#19832sectionMarker (page anchor) prefix is hardcoded as "c"

Michiel Roos 01/15/09, 08:13 updated 11/15/26, 11:21

Description

sectionMarker (page anchor) prefix is hardcoded as “c” while it is freely configurable in css styled content.

You can change the page anchor from the default:
tt_content.stdWrap.dataWrap = |

To something like:
tt_content.stdWrap.innerWrap.cObject.default.10.value =
|
Or
tt_content.stdWrap.innerWrap.cObject.default.10.value =
|

Although it is longer, it’s more descriptive.

The point is that is is changeable by the user. But the anchor prefix is hardcoded in the core as being “c”.

This is in the following files:
sysext/cms/tslib/class.tslib_content.php (line 5268 and line 5390)
sysext/simulatestatic/class.tx_simulatestatic.php (line 166)

(issue imported from #M10147)

Reviews 3

Files 1

History 1429

Show 4 earlier messages
  1. Oliver Hader commented <span data-processor="relativetime" data-value="2009-02-16T14:08:22+00:00" > 02/16/09, 14:08 </span>

    Good one! You could provide a patch if you’d like to… ;-)

  2. Michiel Roos commented <span data-processor="relativetime" data-value="2011-03-17T16:26:48+00:00" > 03/17/11, 16:26 </span>

    Ugly patch attached.

    It looks like some more magic is needed since the user may specify other tt_content fields too:

    But it fixes the simplest case where only uid is used.

  3. Thorsten Kahler changed category status New Accepted PHP Version 4.3 5.2 Complexity hard <span data-processor="relativetime" data-value="2011-08-03T00:29:11+00:00" > 08/03/11, 00:29 </span>

  1. Alexander Opitz commented and changed status Accepted Needs Feedback Is Regression 0 <span data-processor="relativetime" data-value="2014-10-06T13:31:56+00:00" > 10/06/14, 13:31 </span>

    Hi Michiel,

    what’s the state of this issue?

  2. Riccardo De Contardi commented <span data-processor="relativetime" data-value="2015-01-22T10:40:22+00:00" > 01/22/15, 10:40 </span>

    Still present in 6.2 I guess:

    /typo3/sysext/core/Classes/TypoScript/TemplateService.php, line 1529:

    $LD['sectionIndex'] = $page['sectionIndex_uid'] ? '#c' . $page['sectionIndex_uid'] : '';

    /typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php,
    line 5740:

    $sectionMark = $sectionMark ? (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($sectionMark) ? '#c' : '#') . $sectionMark : '';

    line 5946:

    $sectionMark = (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($sectionMark) ? '#c' : '#') . $sectionMark;

    The string “ ‘#c’ “ is also present in:
    /typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
    /typo3/sysext/linkvalidator/Classes/LinkType/InternalLinktype.php

  3. Frans Saris changed tracker Bug Feature status Needs Feedback Accepted PHP Version 5.2 <span data-processor="relativetime" data-value="2015-05-07T10:44:05+00:00" > 05/07/15, 10:44 </span>

  4. Gerrit Code Review pushed patch set 1 for master to change 57321 status Accepted Under Review <span data-processor="relativetime" data-value="2018-06-22T23:55:15+00:00" > 06/22/18, 23:55 </span>

  5. Patrick Schriner commented <span data-processor="relativetime" data-value="2018-06-22T23:56:50+00:00" > 06/22/18, 23:56 </span>

    I made a patch, though I’m not sure this should even be solved. It’s an edge case.

  6. Joerg Kummer commented <span data-processor="relativetime" data-value="2018-08-03T14:30:21+00:00" > 08/03/18, 14:30 </span>

    To test this behaviour following typoscript setup will help.
    Use this setup as root typoscript template on any page with some content elements of any kind (header needed).

    /**
    * TypoScript setup to test issue #18932
    */
    
    // New config variable 'sectionLinkPrefix' - you need to adapt content wraps
    // (typo3/sysext/fluid_styled_content/Resources/Private/Layouts/Default.html)
    config.sectionLinkPrefix = section-element
    
    // Default menu - with section index enabled
    // (https://docs.typo3.org/typo3cms/TyposcriptReference/MenuObjects/Sectionindex/Index.html)
    lib.defaultMenu = HMENU
    lib.defaultMenu {
        entryLevel = 0
        1 = TMENU
        1.NO = 1
        1.NO.allWrap = <li>|</li>
        1.wrap = <ul>|</ul>
        1.sectionIndex = 1
        1.sectionIndex.type = all
        2 = TMENU
        2.NO = 1
        2.NO.allWrap = <li>|</li>
        2.wrap = <ul>|</ul>
        2.sectionIndex = 1
        2.sectionIndex.type = all
        stdWrap.outerWrap = <h2>Default menu - HMNEU with section index enabled</h2>|<hr />
    }
    
    // Section Menu - typolink with section in a CONTENT obj rendering context (integer)
    lib.sectionMenuInteger = CONTENT
    lib.sectionMenuInteger {
        table = tt_content
        renderObj = TEXT
        renderObj {
            field = header
            typolink {
                parameter.data = TSFE:id
                section.field = uid
                wrap = <li>|</li>
            }
        }
        wrap = <ul>|</ul>
        stdWrap.outerWrap = <h2>Section Menu - typolink with section in a CONTENT obj rendering context, where section field is integer (uid)</h2>|<hr />
    }
    
    // Section Menu - typolink with section in a CONTENT obj rendering context (string)
    lib.sectionMenuString = CONTENT
    lib.sectionMenuString {
        table = tt_content
        renderObj = TEXT
        renderObj {
            field = header
            typolink {
                parameter.data = TSFE:id
                section.field = header
                wrap = <li>|</li>
            }
        }
        wrap = <ul>|</ul>
        stdWrap.outerWrap = <h2>Section Menu - typolink with section in a CONTENT obj rendering context, where section field is string (header)</h2>|<hr />
    }
    
    // Section link - simple typolink with section
    lib.sectionLink = TEXT
    lib.sectionLink {
        value = Link to this page
        typolink {
            parameter.data = TSFE:id
            section.field = uid
        }
        wrap = <h2>Section link - simple typolink with section</h2>|<hr />
    }
    
    // Page object - collects all examples above
    page = PAGE
    // Default menu
    page.10 < lib.defaultMenu
    // Section menu
    page.20 < lib.sectionMenuInteger
    page.30 < lib.sectionMenuString
    // Section link
    page.40 < lib.sectionLink
    // Content
    page.100 < styles.content.get
  7. Susanne Moog commented and changed status Under Review Accepted <span data-processor="relativetime" data-value="2019-03-01T18:30:03+00:00" > 03/01/19, 18:30 </span>

    Review was abandoned.

  8. Riccardo De Contardi commented <span data-processor="relativetime" data-value="2020-04-09T22:01:43+00:00" > 04/09/20, 22:01 </span>

    Searched for “’#c’” string on latest master(10.4.0-dev) and found it in these files:

    /typo3/sysext/backend/Classes/ContextMenu/ItemProviders/RecordProvider.php

    /typo3/sysext/backend/Classes/Controller/EditDocumentController.php

    /typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php

    /typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php

    /typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

  9. Christian Kuhn commented and changed status Accepted Closed <span data-processor="relativetime" data-value="2025-06-10T13:26:57+00:00" > 06/10/25, 13:26 </span>

    Hey.

    I’m going to close here for now and hope this is ok:

    • this was open for a very long time without too many people really requiring this feature.
    • a patch has been abandoned since it was limited and did not touch everything.
    • it may be less often an issue nowadays

    In case anyone wishes to drive this forward, we may want to restart with a fresh patch and issue.

  10. Gerrit Code Review pushed patch set 1 for main to change 96102 status Closed Under Review <span data-processor="relativetime" data-value="2026-09-26T13:47:41+00:00" > 09/26/26, 13:47 </span>