Project

General

Profile

Actions

Feature #82738

closed

LinkHandler viewhelper

Added by Guido S. over 6 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-10-11
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
linkhandler, typolink
Complexity:
easy
Sprint Focus:

Description

Hi,

we had following pseudo code:

<typolink>
linktext
svg icon
</typolink>

The svg icon should only showed up, if the typolink is an external url. Finally i build a simple viewhelper and use typo3 core functionality:

    public function render($link = '')
    {
        /** @var LinkService $linkService */
        $linkService = GeneralUtility::makeInstance(LinkService::class);
        $linkDetails = $linkService->resolve($link);

        return $linkDetails['type'];
    }

Maybe we could implementent these little viewhelper to the core?

Simple call

<f:link.linkhandler link="{link}" />

or inline

{f:link.linkhandler(link:'{link}')}
Actions

Also available in: Atom PDF