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

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member II

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

Jump to solution

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);
    });
  }
}

 

cgBZg.png

 

 

 

1 Solution

Accepted Solutions
Highlighted
Active Member II

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

Jump to solution
2 Replies
Highlighted
Active Member II

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

Jump to solution
Highlighted
Community Manager
Community Manager

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

Jump to solution

Hi @wity 

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

Thanks,

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