Index: frontend-ng/src/app/channel/hippoIframe/overlay/overlay.service.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend-ng/src/app/channel/hippoIframe/overlay/overlay.service.js	(date 1513955645000)
+++ frontend-ng/src/app/channel/hippoIframe/overlay/overlay.service.js	(date 1514893897000)
@@ -425,6 +425,8 @@
     }
 
     const config = angular.copy(configObj);
+    delete config.componentId;
+    delete config.componentLastModified;
     delete config.componentParameter;
     if (configObj.documentUuid) { // whenever uuid is available, only edit button for authors
       delete config.templateQuery;
@@ -437,10 +439,24 @@
     return config; // when uuid doesn't exist, only templateQuery (create content option) is returned
   }
 
+  _getComponentLastModified(componentId) {
+    let result = 0;
+    if (componentId) {
+      const component = this.PageStructureService.getComponentById(componentId);
+      if (component) {
+        result = component.getLastModified();
+      }
+    }
+    return result;
+  }
+
   _initManageContentLink(structureElement, overlayElement) {
     // each property should be filled with the method that will extract the data from the HST comment
     // Passing the full config through privileges to adjust buttons for authors
+    const componentId = structureElement.getComponentId();
     const config = this.filterConfigByPrivileges({
+      componentId: componentId,
+      componentLastModified: this._getComponentLastModified(componentId),
       componentParameter: structureElement.getComponentParameter(),
       componentPickerConfig: structureElement.getComponentPickerConfig(),
       componentValue: structureElement.getComponentValue(),
Index: frontend-ng/src/app/channel/page/element/manageContentLink.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend-ng/src/app/channel/page/element/manageContentLink.js	(date 1513955645000)
+++ frontend-ng/src/app/channel/page/element/manageContentLink.js	(date 1514892997000)
@@ -21,6 +21,10 @@
     super('manage-content-link', commentElement, metaData);
   }
 
+  getComponentId() {
+    return this.metaData.componentId;
+  }
+
   getComponentParameter() {
     return this.metaData.componentParameter;
   }
Index: frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-1/step-1.component.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-1/step-1.component.ts	(date 1513955645000)
+++ frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-1/step-1.component.ts	(date 1514894936000)
@@ -56,6 +56,8 @@
     private translate: TranslateService) {}
 
   ngOnInit() {
+    console.log('step 1 options', this.options);
+
     if (!this.options) {
       throw new Error('Input "options" is required');
     }
@@ -94,11 +96,15 @@
     this.createContentService
       .createDraft(document)
       .subscribe(
-      (response) => this.onContinue.emit({
-      name: this.nameUrlFields.nameField,
+        () => this.onContinue.emit({
+          name: this.nameUrlFields.nameField,
           url: this.nameUrlFields.urlField,
-          locale: this.locale
-        }),(error) => this.onErrorCreatingDraft(error),
+          locale: this.locale,
+          componentId: this.options.componentId,
+          componentLastModified: this.options.componentLastModified,
+          componentParameter: this.options.componentParameter,
+        }),
+        (error) => this.onErrorCreatingDraft(error),
     );
   }
 
Index: frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.ts	(date 1513955645000)
+++ frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.ts	(date 1514904221000)
@@ -27,6 +27,7 @@
 import { NameUrlFieldsDialogComponent } from './name-url-fields-dialog/name-url-fields-dialog';
 import { Document, DocumentTypeInfo } from '../create-content.types';
 import FeedbackService from '../../../../../services/feedback.service.js';
+import HstService from '../../../../../services/hst.service';
 
 @Component({
   selector: 'hippo-create-content-step-2',
@@ -36,6 +37,9 @@
 export class CreateContentStep2Component implements OnInit {
   private documentUrl: string;
   private documentLocale: string;
+  private componentId: string;
+  private componentParameterName: string;
+  private componentParameterValue: string;
   doc: Document;
   docType: any;
   editing: boolean;
@@ -67,6 +71,7 @@
               private fieldService: FieldService,
               private dialogService: DialogService,
               private feedbackService: FeedbackService,
+              private hstService: HstService,
               private translate: TranslateService,
               public dialog: MatDialog) {}
 
@@ -103,7 +108,7 @@
     dialog.beforeClose().subscribe((result: { name: string, url: string }) => {
       // If dialog was not cancelled (has a result)
       if (result) {
-        this.onEditNameUrlDialogClose(result)
+        this.onEditNameUrlDialogClose(result);
       }
     });
     return dialog;
@@ -115,7 +120,7 @@
       this.doc.displayName = result.displayName;
       this.documentUrl = result.urlName;
     } catch (error) {
-        const errorKey = this.translate.instant(`ERROR_${error.data.reason}`)
+        const errorKey = this.translate.instant(`ERROR_${error.data.reason}`);
         this.feedbackService.showError(errorKey, error.data.params);
     }
   }
@@ -128,6 +133,9 @@
     this.doc.displayName = this.options.name;
     this.documentUrl = this.options.url;
     this.documentLocale = this.options.locale;
+    this.componentId = this.options.componentId;
+    this.componentParameterName = this.options.componentParameter;
+    this.componentParameterValue = '/content/documents/hap/banners/banner2';
   }
 
   setFullWidth(state: boolean) {
@@ -137,12 +145,23 @@
 
   saveDocument() {
     this.contentService.saveDraft(this.doc)
+      .then(() => this._saveComponentParameter())
       .then(() => {
         this.onBeforeStateChange.emit(() => Promise.resolve());
         this.onSave.emit(this.doc.id);
       });
   }
 
+  _saveComponentParameter() {
+    const componentVariantId = 'hippo-default';  // TODO: use variant currently shown (only applicable in DXP)
+
+    const parameters = {};
+    parameters[this.componentParameterName] = this.componentParameterValue;
+
+    // this.composerRestMountUrl + '/' + this.componentId + './' + encodeURIComponent(this.variant.id)
+    return this.hstService.doPutForm(parameters, this.componentId, componentVariantId);
+  }
+
   isDocumentDirty(): boolean {
     return (this.doc && this.doc.info && this.doc.info.dirty);
   }
Index: frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/create-content.types.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/create-content.types.ts	(date 1513955645000)
+++ frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/create-content.types.ts	(date 1514894907000)
@@ -24,6 +24,8 @@
 }
 
 export interface CreateContentOptions {
+  componentId?: string;
+  componentLastModified?: string;
   componentParameter?: string;
   defaultPath?: string;
   rootPath?: string;
Index: frontend-ng/src/app/shared/services/hst.service.provider.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend-ng/src/app/shared/services/hst.service.provider.ts	(date 1514904507000)
+++ frontend-ng/src/app/shared/services/hst.service.provider.ts	(date 1514904507000)
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2018 Hippo B.V. (http://www.onehippo.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import HstService from '../../services/hst.service.js';
+
+export function hstServiceFactory(i: any) {
+  return i.get('HstService');
+}
+export const HstServiceProvider = {
+  provide: HstService,
+  useFactory: hstServiceFactory,
+  deps: ['$injector']
+};
Index: frontend-ng/src/app/shared/shared.module.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend-ng/src/app/shared/shared.module.ts	(date 1513955645000)
+++ frontend-ng/src/app/shared/shared.module.ts	(date 1514904552000)
@@ -25,6 +25,7 @@
 import { DialogServiceProvider } from './services/dialog.service.provider';
 import { FeedbackServiceProvider } from './services/feedback.service.provider';
 import { FieldServiceProvider } from './services/field.service.provider';
+import { HstServiceProvider } from './services/hst.service.provider';
 import { TranslateModule } from '@ngx-translate/core';
 
 // Curently the impl of flex-layout break-points clashes with $rootScope.$apply()
@@ -56,7 +57,8 @@
     EmptyBreakPointsProvider,
     DialogServiceProvider,
     FeedbackServiceProvider,
-    FieldServiceProvider
+    FieldServiceProvider,
+    HstServiceProvider
   ]
 })
 export class SharedModule {}
