Could you please consider adding the Target option to the Custom URL field. I use custom fields to create a News Article list where the site owner is interviewed and link out to those News article/interviews. I want those to open in a new tab, I know I can do this with an override but for offsite links many of us want those links opened in a new tab, and it just seems like this should be an option on the URL so overrides are not required.
Thank you,
Mike
| Labels |
Removed:
?
|
||
| Labels |
Added:
No Code Attached Yet
|
||
@SHAGNIK007 That sounds perfect to me.
Thank you very much!
Mike
Hey @Mike92115 , that sounds like a really useful improvement. To make sure the maintainers are aware of it as a feature request, I'm moving this over to the discussions section so it doesn't get lost and can be discussed. Feel free to continue the discussion there.
| Labels |
Added:
Feature
|
||
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-10-05 17:17:15 |
| Closed_By | ⇒ | LadySolveig |
Hi @Mike92115,
I can take this on and submit a Pull Request for the
6.1-devbranch! Adding a target option natively makes a lot of sense so users don't have to rely on template overrides just to open offsite links in a new tab[cite: 2].Here is my proposed approach to implement this:
plugins/fields/url/) to include a newtargetparameter. This will provide a dropdown in the backend with standard options like "Same Window (_self)" and "New Window (_blank)".plugins/fields/url/tmpl/url.php) to read this new parameter. If a target is configured, the code will inject thetarget="..."attribute directly into the generated<a>tag.en-GB) language strings for the new labels and descriptions in the plugin's language files so it is ready for translation.Let me know if this approach sounds good to the maintainers, and I'll get a PR drafted up!