Skip to content

Instantly share code, notes, and snippets.

@chrismrgn
Last active Sep 7, 2016
Embed
What would you like to do?
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