Skip to content

Instantly share code, notes, and snippets.

@chrismrgn
Last active September 7, 2016 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismrgn/1827bf0a5f242922f7e4 to your computer and use it in GitHub Desktop.
Save chrismrgn/1827bf0a5f242922f7e4 to your computer and use it in GitHub Desktop.
Tridion WebDavUrl Bookmarklet Snippet
javascript: (function (UI, B, e, a, r, d)
{
try
{
while (r = UI.frames[e++])
{
if ((a = r.$display && r.$display.getView()) && a.getId() == B)
{
d = a;
break;
}
}
var m1 = window.top.frames[0];
var itemId = d.getMainInterface().getListSelection().getVersionlessIds()[0];
var item = m1.$models.getItem(itemId);
if(item != undefined){
item.loadWebDavUrl();
setTimeout(function(){
var itemWebDavUrl = item.getWebDavUrl();
alert(itemWebDavUrl);
}, 400);
}
else {
alert('Please select an item...');
}
}
catch (x) {alert('Please select an item...');};
})(window.top, 'DashboardView', 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment