So I got tired of trying to do this and thought I would take matters into my own hands.
Here is what I came up with:
function AddContentTypeLink() {
var spans = document.getElementsByTagName('h2');
var stringToMatch = ' Site Content Types ';
for (var i = 0; i < spans.length; ++i) {
if (spans[i].innerHTML.indexOf(stringToMatch) != -1) {
spans[i].innerHTML = spans[i].innerHTML.replace(stringToMatch ,"<a href='/_layouts/mngctype.aspx'>" + stringToMatch + "</a>");
break;
}
}
}
_spBodyOnLoadFunctionNames.push('AddContentTypeLink');
Add this to an existing JavaScript file you have on the go (or in a CEWP on the settings pages where it exists if you are desperate)
If all worked properly you should be left with this:
It may not be pretty but it works well...
If you are working in a different language you can change the string variable to whatever it translates to (French for example is " Types de contenu de site " (don't forget the leading and trailing space!)
No comments:
Post a Comment