-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
[4.x] Field based redirects may provide a status #9417
[4.x] Field based redirects may provide a status #9417
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started tweaking the code and then we talked about it a little here and came up with some more changes.
Could you please:
- Remove the
redirect_status
field. - Make
redirect
into agroup
field containingurl
andstatus
fields. (We preferred if there was still just a single field) - Make the
url
sub-field 100% wide - Make the
status
sub-field a 100% widthradio
withinline: true
(The select was a bit cramped) - Tweak
DataResponse@getRedirect
so that:- If the value is an array (via the group fieldtype), it gets the
url
andstatus
from the sub-values. - If the value is a string, it uses that like it always has. Assume a 302 status.
- If the value is an array (via the group fieldtype), it gets the
No problem. I’ll work on it tomorrow 👍 |
@jasonvarga thats done. You'll see there were a few other tweaks required to queries and elsewhere in ResolveRedirect |
status
option to link blueprint
Awesome. Thank you. |
Wow, thanks @ryanmitchell for looking into my idea :) |
status
option to link blueprint
This PR adds the ability to choose whether a redirect from the 'Link' blueprint is a 301 or a 302 redirect.
Closes statamic/ideas#1118