Bug #87616

Allow modifying link parameter in TypolinkModifyLinkConfigForPageLinksHookInterface

Added by Robert Vock 16 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-02-01
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Also available in: Atom PDF