File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
55This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
66
7+ ## [ 4.1.1]
8+
9+ * exclude folder pages from DisallowedPages
10+
711## [ 4.1.0]
812
913* add workaround for fromholdio/silverstripe-errored to update robots tag for error pages
Original file line number Diff line number Diff line change 33namespace Innoweb \Robots \Controllers ;
44
55use Fromholdio \SuperLinkerRedirection \Pages \RedirectionPage ;
6+ use Innoweb \FolderPage \Pages \FolderPage ;
67use SilverStripe \CMS \Model \RedirectorPage ;
78use SilverStripe \CMS \Model \SiteTree ;
89use SilverStripe \Control \Controller ;
@@ -166,6 +167,16 @@ public function getDisallowedPages()
166167 ]);
167168 }
168169
170+ // exclude folder pages
171+ $ isFoldersEnabled = ModuleLoader::inst ()
172+ ->getManifest ()
173+ ->moduleExists ('innoweb/silverstripe-folder-page ' );
174+ if ($ isFoldersEnabled ) {
175+ $ pages = $ pages ->exclude ([
176+ 'ClassName ' => FolderPage::class
177+ ]);
178+ }
179+
169180 $ googleSitemap = GoogleSitemap::singleton ();
170181 $ isFiltered = (bool ) $ googleSitemap ->config ()->get ('use_show_in_search ' );
171182 $ filterFieldName = 'ShowInSearch ' ;
You can’t perform that action at this time.
0 commit comments