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

Feature/1129 fs url fields part of fs settings #13224

Merged
merged 7 commits into from
May 26, 2023

Conversation

i-just
Copy link
Contributor

@i-just i-just commented May 19, 2023

Description

  • “Files in this filesystem have public URLs” and “Base URL” fields moved to under “Filesystem Type”.
  • New protected $showHasUrlSetting and $showUrlSetting properties were introduced in the FsTrait. They’re true by default, so if FS doesn’t implement any changes, it will work as before.
  • In your FS, you can specify $showHasUrlSetting = false, which will stop the toggle from showing in the template.
  • In your FS, you can specify showUrlSetting = false, which will stop the “Base URL” field from showing in the template, even if the “Files in this filesystem have public URLs” is on.
  • project config structure remains unchanged (hasUrls and url are on the top level)

It’s all done as a non-breaking change and could be tidied up for Craft 5. For example, in Craft 5, $hasUrls and $url could be moved to fully be a part of the settings.

@timkelty At the moment, if the “Files in this filesystem have public URLs” toggle doesn’t show, the “Base URL” field also doesn’t show - LMK if you need this decoupled.

Related issues

dev-1129

@i-just i-just marked this pull request as ready for review May 22, 2023 15:41
@i-just i-just requested a review from a team as a code owner May 22, 2023 15:41
@brandonkelly brandonkelly merged commit 5e0d52d into 4.5 May 26, 2023
@brandonkelly brandonkelly deleted the feature/1129-fs-url-fields-part-of-fs-settings branch May 26, 2023 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants