Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add query string to href generated with link to entry? #235

Closed
gmhenderson opened this issue Jun 11, 2020 · 3 comments
Closed

Add query string to href generated with link to entry? #235

gmhenderson opened this issue Jun 11, 2020 · 3 comments
Assignees
Milestone

Comments

@gmhenderson
Copy link

When using the Link to entry function, an href is generated like:

href="https://mysite.com/my-page#entry:4386:url"

which I can manually edit to:

href="https://mysite.com/my-page?test=test#entry:4386:url"

But the query string is stripped out after saving the entry. If I add it at the end, then the refs aren't parsed:

href="https://mysite.com/my-page#entry:4386:url?test=test"

Is there any way to make the refs hash play nicely with a query string? I cannot simply hardcode the href value because I am using a multi-site setup and wish for the actual href to reflect the current site's baseUrl.

@andris-sevcenko
Copy link
Contributor

While exposed in Redactor, this is actually something that Craft would need to address, as element references don't yet support parameters.

@andris-sevcenko andris-sevcenko transferred this issue from craftcms/redactor Jun 12, 2020
@brandonkelly brandonkelly transferred this issue from craftcms/cms Jun 15, 2020
@brandonkelly brandonkelly self-assigned this Jun 15, 2020
@brandonkelly brandonkelly added this to the 2.7 milestone Jun 15, 2020
@brandonkelly
Copy link
Member

This was actually something Redactor could add support for directly. Just added it for the upcoming 2.7 release.

@brandonkelly
Copy link
Member

Redactor 2.7.0 is out now with this change.

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

No branches or pull requests

3 participants