Hi,
Sometimes I use a repeater and I would like some items to be links, and others no, conditioned for instance by a non empty ACF text/URL subfield.
Currently, when a block’s dynamic URL is empty (non existing or empty ACF subfield), the <a>
tag is used anyway, and href
, rel
and target
attributes are set, which is very confusing for visitor, since link appearance is used (styling/cursor/hover effect/etc) and link is actually active (leading to current page).
I think when dynamic URL is empty/not set/null/not valid, block should remain unmodified (a div
stays a div
, a p
stays a p
…).
For backward compatibility issues, it might not be good to set this as default behavior, but there could be a toggle in block’s link popup to fallback to no link if URL is empty.
Thanks for considering this.