I wrote a small Frontend Plugin "Text+Image+Link". If my editor choose a file link or an external Link, he also assign to open the target in a new window: _blank
In my Fluid-Tempalte I wrote
<f:link.page pageUid="{txtTarget}" class="btn btn-default">{txtLink}</f:link.page>
But there's no support to the link target, here's the output:
<a class="btn btn-default" href="http://kbs2015.com">Read more</a>
There's no target-attribute, but I chose it at Link Wizard (flexform): target:_blank !?
-
I try it like this:
<f:format.html><link {txtTarget}>{txtLink}</link></f:format.html>
There's the right link and target but no CLASS! Output:
<a href="http://kbs2015.com" target="_blank">Read more</a>
- How can I use target (from wizard) and two classes for a Link in FLUID? DO I need a new ViewHelper? I don't know? Can I solve my problem with Fluid?
Thanks for your help.
( TYPO3 6.2.8 )
It depends on which TYPO3 version you use. TYPO3 7.0 has a new ViewHelper (TypolinkViewHelper) which handles Typolinks created with the link wizzard and respects link targets. In TYPO3 4.5 and TYPO3 6.2 there is no such viewhelper, so you should try to backport the viewhelper from TYPO3 7.0 to your extension.
Copy the content from the linked viewhelper to the Viewhelpers directory of your extension and adjust the namespace to match the one from your extension. Then you can use the viewhelper in your extension.