code/FileSubsites.php
/**
	 * Add subsites-specific fields to the folder editor.
	 */
Add subsites-specific fields to the folder editor.
Add subsites - specific fields to the folder editor .
function updateCMSFields(FieldSet &$fields) {
		if($this->owner instanceof Folder) {
			$sites = Subsite::accessible_sites('CMS_ACCESS_AssetAdmin');
			$dropdownValues = ($sites) ? $sites->toDropdownMap() : array();
			$dropdownValues[0] = 'All sites';
			ksort($dropdownValues);
			if($sites)$fields->addFieldToTab('Root.Details', new DropdownField("SubsiteID", "Subsite", $dropdownValues));
		}
	}
function updateCMSFields ( FieldSet & $ fields ) { if ( $ this -> owner instanceof Folder ) { $ sites = Subsite :: accessible_sites ( 'CMS_ACCESS_AssetAdmin' ) ; $ dropdownValues = ( $ sites ) ? $ sites -> toDropdownMap ( ) : array ( ) ; $ dropdownValues [ 0 ] = 'All sites' ; ksort ( $ dropdownValues ) ; if ( $ sites ) $ fields -> addFieldToTab ( 'Root.Details' , new DropdownField ( " SubsiteID " , " Subsite " , $ dropdownValues ) ) ; } }
Add subsites-specific fields to the folder editor.
Add subsites - specific fields to the folder editor .