Actions
Feature #82738
closedLinkHandler viewhelper
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}')}
Updated by Georg Ringer over 6 years ago
- Status changed from New to Rejected
Thanks for creating this issue. However I don't see any sense in having this VH in the core. As you can have done it, this can be perfectly done with a custom VH or e.g. with JS or even with CSS: https://davidwalsh.name/external-links-css and hinding the svg via css.
Actions