diff --git a/code/extensions/SiteConfigSubsites.php b/code/extensions/SiteConfigSubsites.php index c8b5fb5..d54d7cd 100644 --- a/code/extensions/SiteConfigSubsites.php +++ b/code/extensions/SiteConfigSubsites.php @@ -3,7 +3,7 @@ /** * Extension for the SiteConfig object to add subsites support */ -class SiteConfigSubsites extends DataExtension { +class SiteConfigSubsites extends DataExtension { private static $has_one = array( 'Subsite' => 'Subsite', // The subsite that this page belongs to @@ -38,4 +38,8 @@ class SiteConfigSubsites extends DataExtension { function cacheKeyComponent() { return 'subsite-'.Subsite::currentSubsiteID(); } + + function updateCMSFields(FieldList $fields) { + $fields->push(new HiddenField('SubsiteID','SubsiteID', Subsite::currentSubsiteID())); + } }