public function getCMSFields() {
		$fields = parent::getCMSFields();

		$fields->removeByName('ParentID');
		if (count($this->remoteProperties)) {
			$mapping = $this->editableFieldMapping();
			foreach ($this->remoteProperties as $name => $value) {
				$field = null;
				if (isset($mapping[$name])) {
					$field = $mapping[$name];
					if (is_string($field)) {
						$field = new $field($name, $this->fieldLabel($name), $value);
						$fields->addFieldToTab('Root.Main', $field);
					}
				} else if(!is_object($value) && !is_array($value)){
					$value = (string) $value;
					$field = new ReadonlyField($name, _t('ExternalContentItem.' . $name, $name), $value);
					$fields->addFieldToTab('Root.Main', $field);
				} else if(is_object($value) || is_array($value)){
					foreach($value as $childName => $childValue) {
						if(is_object($childValue)) {
							foreach($childValue as $childChildName => $childChildValue) {
								$childChildValue = is_object($childChildValue) || is_array($childChildValue) ? json_encode($childChildValue) : (string) $childChildValue;
								$field = new ReadonlyField("{$childName}{$childChildName}", "{$childName}: {$childChildName}", $childChildValue);
								$fields->addFieldToTab('Root.Main', $field);
							}
						}
						else {
							$childValue =  is_object($childValue) || is_array($childValue) ? json_encode($childValue) : (string) $childValue;
							$field = new ReadonlyField("{$childName}{$childValue}", $name . ':' . $childName, $childValue);
							$fields->addFieldToTab('Root.Main', $field);
						}
					}
				}
			}
		}

		return $fields;
	}