cancel
Showing results for 
Search instead for 
Did you mean: 

How to get nodeID from custom contextMenu button ( alfresco content app )

wity
Confirmed Champ
Confirmed Champ

Hello, 

please can anyone help me with this?

I am looking for alternative for alfresco share custom buttons on the files and folders. I am create in app.extenstion.json new contextMenu button with this tutorial: https://alfresco-content-app.netlify.app/#/tutorials/dialog-actions but there is only way for show some dialog, not for call repo websript with actual nodeRef in parametr. How can I do that ? Smiley Happy

I have custom contextMenu button in ACA appliacation and I need get nodeID from clicked folder or document.

import { ActivatedRoute, Params } from "@angular/router";
import { Component, OnInit } from "@angular/core";

@Component({  selector: "aca-my-extension-dialog",  templateUrl: "./my-extension-dialog.component.html",  styleUrls: ["./my-extension-dialog.component.scss"],
})
export class MyExtensionDialogComponent implements OnInit {  content: string = null;

  constructor(private route: ActivatedRoute) {}  ngOnInit() {
    this.route.params.subscribe(({ nodeId }: Params) => {      alert("node: " + nodeId);
    });
  }
}

image

1 ACCEPTED ANSWER
2 REPLIES 2

EddieMay
World-Class Innovator
World-Class Innovator

Hi @wity 

Thanks for posting the solution - really helpful to other users!

Thanks,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!