Deep link into the Umbraco back-office content editing tab
Obviously I can link users to the appropriate back office content editing page (via link like below), but we have a lot of tabs, with a lot of properties and would like to deep link directly to the tab the content is on.
How can I anchor link or activate the appropriate tab with a single url?
Out of the box, nope. Changing tabs doesn't push anything into the history stack, so there's no relationship between the current tab and the URL.
You could write some javascript to run in the backoffice to parse out the anchor value, and use that to find the correct tab link element and trigger a click.
If your URL was /umbraco/#/content/content/edit/1146#metadata you'd need to do some gymnastics since window.location.hash will return #/content/content/edit/1146#metadata.
Quick and dirty...
var hashSegments = window.location.hash.split('#');
if (hashSegments.length > 1) {
var hash = hashSegments[hashSegments.length - 1].toLowerCase();
var tabs = document.querySelectorAll('.umb-nav-tabs li');
tabs.forEach(function(v) {
if (v.innerText.toLowerCase() === hash) {
v.querySelector('a').click();
}
});
}
Deep link into the Umbraco back-office content editing tab
Obviously I can link users to the appropriate back office content editing page (via link like below), but we have a lot of tabs, with a lot of properties and would like to deep link directly to the tab the content is on. How can I anchor link or activate the appropriate tab with a single url?
Out of the box, nope. Changing tabs doesn't push anything into the history stack, so there's no relationship between the current tab and the URL.
You could write some javascript to run in the backoffice to parse out the anchor value, and use that to find the correct tab link element and trigger a click.
If your URL was /umbraco/#/content/content/edit/1146#metadata you'd need to do some gymnastics since window.location.hash will return #/content/content/edit/1146#metadata.
Quick and dirty...
is working on a reply...