I am trying to add a button to the wiki toolbar. My button when clicked calls a repo webscript and should pass a noderef param to the webscript from the current wiki page. What I cannot figure out at the moment is how to get a nodeRef from the current wiki page. I have been poking around in the share/components/wiki/toolbar.js. I can see the title being passed in but I don't see any way to get the nodeRef.I've been trying to mimic the delete button. I essentially want the same functionality.Sample:
onConfirmSync: function WikiToolbar_onConfirmSync(e)
{
Alfresco.util.Ajax.request(
{
method: Alfresco.util.Ajax.POST,
//url: Alfresco.constants.PROXY_URI + "slingshot/wiki/page/" + this.options.siteId + "/" + encodeURIComponent(this.options.title) + "?page=wiki",
url: Alfresco.constants.PROXY_URI + "myscripts/mysyncscript.json?nodeRef="+encodeURIComponent(this.options.noderef),
successCallback:
{
fn: this.onPageSync,
scope: this
},
failureMessage: this._msg("load.fail")
});
},
FYI: I am not very good with JS and worse with YUI.Is it possible to get a nodeRef?Do I need to call a repo webscript with the wiki title to get the metadata/noderef?Any ideas would be appreciated?Thanks