<f:link.typolink parameter="{mylink">
links to a internal page- when this page is hidden / not visible in backend no is set.
This breaks my html:
Instead of
<div class="mylink">
<a href="mylink">my text</a>
</div>
I get
<div class="mylink">my text/div>
Is there a way to check if the linked page is visible / not hidden?
You can use the
f:uri.typolink
viewhelper to check if the resulting URI is empty or not and then generate the link withf:typolink
as normal:If you do not care about attributes set in
{mylink}
, e.g.class
ortarget
you can reuse the already generated URI: