statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
32 stars 1 forks source link

Add option to input a query string or fragment on the entry link field #1171

Open godismyjudge95 opened 5 months ago

godismyjudge95 commented 5 months ago

I've run into this a few times, you need to link to an entry - let's say a page called "Properties" - so you choose the entry for the link in Bard or a nav item.

But now lets say you have some special functionality on that page which requires a parameter. You can no longer use the "link to an entry" functionality because that doesn't support adding a query string.

Instead you are left having to copy the entry's url and manually pasting in the url. This is sometimes undesired as now the entry is not technically linked and you can have the link break without you knowing.

The same field could be used to add a url fragment to scroll to a specific element. Think of a nav/content link that would scroll directly to the sales contact info with this url: /contact#sales

My suggestion would be to add a "append to url" field to the nav item and the content editor link to entry forms.