Closed alexander-schranz closed 11 months ago
This is already happening: https://github.com/sulu/sulu/blob/829646662dc20e45fc02749092c44ad4102e052c/src/Sulu/Bundle/MarkupBundle/Markup/LinkTag.php#L105C20-L105C20
And any link that can not be found will be removed from the resulting HTML.
Yeah but the content is still outputted, in this case whole tag with content should be removed.
No problem. :D
Problem description
If you have a
sulu-link
and the target page does not exist the whole tag is removed but the text stay as it is. This is expected behaviour when thesulu-link
is used inside a text editor so nothing is removed from the text.But when the sulu-link is used via the
link
content type it would be nice if there is a attribute to tell if the target link does not exist to remove also the text.Proposed solution
Something like:
The service handling this is the HtmlMarkupParser and its child services. Which would needed to add the new support for this attribute.