开发者

Open node in Umbraco programmatically

I have created a dashboard for an Umbraco site and I want to link from it to various node in the tree.

From what I can tell Umbraco uses editcontent.aspx?id={thenodeid} and javascript:opencontent({nodeid}).

Whenever I try to use these they always fail.

Does anyone know how to open a display a node 开发者_高级运维in the Umbraco back end?


Like Tim Saunders said you really just need to target the correct iframe. The openContent function looks like this:

function openContent(id) {
 parent.right.document.location.href = 'editContent.aspx?id=' + id;
}

So you need to target the 'right' iframe.


I've tested editContent.aspx?id=1234 on my Umbraco installation and it seems to work correctly.

I'm assuming you are replacing {thenodeid} with the actual node id you want?

Umbraco uses iFrames in the backend for the content tree and the content areas etc. This means that you do not always have full access to the Javascript libraries from the frame that you are in.

Therefore you may need to either include the library in the page you are working with or try and reference the method calls by walking up the dom.

I can't find any documentation for this so it may be a case of looking at the HTML source and working out what is going on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜