Issue Bug Closed

#87616Allow modifying link parameter in TypolinkModifyLinkConfigForPageLinksHookInterface

Robert Vock 02/01/19, 13:50 updated 10/04/22, 13:59

Description

The PageLinkBuilder has a hook to modify the typolink-configuration with TypolinkModifyLinkConfigForPageLinksHookInterface:
PageLinkBuilder.php#L74

This Feature was introduced with #79121: Documentation for Feature-79121 (as a side-note: The link to the Typolink documentation is broken)

Unfortunately it is not possible to modify the ‘parameter’ field of the typolink configuration. (It will be ignored later on). I have a hook, which does the following (simplified):

public function modifyPageLinkConfiguration(array $linkConfiguration, array $linkDetails, array $pageRow): array {
    $linkConfiguration['parameter'] = 15;
    $linkConfiguration['section'] = 'c254';
    return $linkConfiguration;
}

This does not result in a link to Content-Element #c254 on PageID 15, but still links to the page in $pageRow.

Reviews 2