- I have a Custom Block type.
- It has a link field that allows
<nolink>
- In the twig template for that Custom Block type I want to check if the link field has
<nolink>
.
I can see there is a protected value under #url for routeName that is NULL when there is a link, and <nolink>
when <nolink>
is used, but I can't figure out how to check it.
I can also see there's a protected uri under #url with a similar situation. If <nolink>
is used, that value is NULL. If there is a link, the link is in there.
{{ kint() }}
in your template to inspect the available methods?