When you link to external sites, you might or might not want that link to open in the same window. I think it'd be great if you can manage that with this field.
In the panel - simply show a checkmark when the link type is an actual document (URL or Page) and not email, tel or file.
In the PHP code - perhaps add a toLinkAttributes() method that returns just the HTML attributes, not a full <a> tag, because that would be pretty limiting.
For example:
mylink:
type: page
link: my/page
popup: true
...and when you invoke $page->mylink()->toLinkAttributes(), you get:
When you link to external sites, you might or might not want that link to open in the same window. I think it'd be great if you can manage that with this field.
In the panel - simply show a checkmark when the link type is an actual document (URL or Page) and not email, tel or file.
In the PHP code - perhaps add a
toLinkAttributes()
method that returns just the HTML attributes, not a full<a>
tag, because that would be pretty limiting.For example:
...and when you invoke
$page->mylink()->toLinkAttributes()
, you get:In your template, you use it like: