From ca842dc528a0401108b78c3ab804285a6b35df1d Mon Sep 17 00:00:00 2001 From: James Cocker Date: Fri, 23 Feb 2024 17:23:04 +0000 Subject: [PATCH] Added SiteTreeURLSegmentField.ss template with Copy button --- README.md | 1 + .../CMS/Forms/SiteTreeURLSegmentField.ss | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 templates/SilverStripe/CMS/Forms/SiteTreeURLSegmentField.ss diff --git a/README.md b/README.md index be41839..a9cfaa4 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ While it is possible to disable specific tweaks by removing the individual exten ## Templates * __Email.ss:__ Sets font to sans-serif * __ForgotPasswordEmail.ss:__ Changes the wording and format of the forgotten password e-mail to make it a bit friendlier. +* __SiteTreeURLSegmentField.ss:__ Adds a "Copy URL" button. To help stop users from copying the draft link. ## Modules * __[wilr/silverstripe-googlesitemaps](https://github.com/wilr/silverstripe-googlesitemaps):__ Lets CMS users set certain (e.g. hidden) pages to not be indexed. diff --git a/templates/SilverStripe/CMS/Forms/SiteTreeURLSegmentField.ss b/templates/SilverStripe/CMS/Forms/SiteTreeURLSegmentField.ss new file mode 100644 index 0000000..a05634f --- /dev/null +++ b/templates/SilverStripe/CMS/Forms/SiteTreeURLSegmentField.ss @@ -0,0 +1,30 @@ +
+ + $URL + +
+ + <% if not $IsReadonly %> + + <% end_if %> +
+
+ +
+
+ +
+ +
+
+ +
+
+ <% if $HelpText %>

$HelpText

<% end_if %> +
\ No newline at end of file