Skip to content

[5.x]: New link field does not accept additional parameters for entries #15941

Open

Description

What happened?

Description

We are using the new link field and it saves us the time to configure something ourselves.
But now a client wants one of these link fields to point to an entry page but with the addition of some extra URL parameters which are used for filtering. In our case the URL looks like this => www.mydomain.com/en/resources?categories=863&currentAmount=6

How could this be achieved?
I can of course just hardcode it using the URL Link Type but we currently have this only on a staging site.
When the site goes live this needs to point to the live domain, not the staging domain.

I would hardcode it using the staging domain and when we go live use the find and replace functionality under "Utilities".
Feels a bit hacky but it does the trick.
The find and replace functionality also does not first show me all the matches it has found before actually replacing them so it really is a bit dangerous to use this.

Is there any better way to achieve this?

Craft CMS version

5.x

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions