You could probably overwrite some of the core code but then you'll need to do it over and over again if you upgrade or when you start new projects etc.
I'm not sure what the best solution is for this but perhaps it's worth adding a feature request to the issue tracker suggesting it's possible to configure where the child items tab should be placed.
I have posted a request to enable sorting but have worked out a patch that can rearrange the tabs.
If you are happy to patch your Umbraco, whilst waiting for a built in solution:
I created a JS object to handle checking the Document Type and then if necessary rearrange the tabs.
I've used a separate file so that code wont get removed when Umbraco gets updated. Bring this into scope by adding a < script src=... > to ~\umbraco\Views\default.cshtml You will need to add this script tag back after updates.
var myPatches= {}
myPatches.fixTabsOnEdit = function (data) {
switch (data.contentTypeName) {
case "Editorial":
case "EditorialHistoric": {
myPatches.rearrange(data.tabs);
break;
}
default: {
}
}
}
/* move "Child Items" tab to the end, and change the label */
myPatches.rearrange = function (a) {
if (a.length) {
var tmp = a.shift();
tmp.label = "Comments";
a.push(tmp);
}
}
Then find ~\umbraco\js\umbraco.controllers.js search for contentResource.getById in my version of Umbraco its on line 1882:
contentResource.getById($routeParams.id)
.then(function (data) {
myPatches.fixTabsOnEdit(data); // pass to my object to check types and rearrange
$scope.loaded = true;
$scope.content = data;
....etc....
the then(...) promise is pretty much the first time the client gets to see the data returned by Umbraco, so I just pass the data to my code to check and process it if necessary.
Again you will need to patch this again after an update from U-HQ.
Tried this Approach but you dont see to get the return to list button option which will cause confusion for end users. Think the Patch is the best option
In the list view section there is a Display at tab Number option, just set it to the position you want the child tab to be at. i set it to -1 which will force it before any other tab.
Can we control the position of the "Child Items" tab in the content view?
In some cases having the Child Items tab first is counter intuitive. Can we set where it should appear?
Hi Adrian
The short answer to this is "no".
You could probably overwrite some of the core code but then you'll need to do it over and over again if you upgrade or when you start new projects etc.
I'm not sure what the best solution is for this but perhaps it's worth adding a feature request to the issue tracker suggesting it's possible to configure where the child items tab should be placed.
Cheers, Jan
I have posted a request to enable sorting but have worked out a patch that can rearrange the tabs.
If you are happy to patch your Umbraco, whilst waiting for a built in solution:
I created a JS object to handle checking the Document Type and then if necessary rearrange the tabs. I've used a separate file so that code wont get removed when Umbraco gets updated. Bring this into scope by adding a < script src=... > to ~\umbraco\Views\default.cshtml You will need to add this script tag back after updates.
Then find ~\umbraco\js\umbraco.controllers.js search for contentResource.getById in my version of Umbraco its on line 1882:
the then(...) promise is pretty much the first time the client gets to see the data returned by Umbraco, so I just pass the data to my code to check and process it if necessary.
Again you will need to patch this again after an update from U-HQ.
I had same issue with List View and was able to solve the same.
Please see screenshots-
Created a custom listview
Added a new Tab (Product List) and added new column with the data type as new List View. This added a new column with same list.
Not sure if this is fundamentally wrong, but worked for me.
Awesome - saved me a headache here!
Tried this Approach but you dont see to get the return to list button option which will cause confusion for end users. Think the Patch is the best option
Hi Peeps,
This must have been fixed with the later versions of Umbraco. I write a quick blog about it here. You will find instructions how to do this.
https://www.umbrajobs.com/blog/posts/2018/july/umbraco-control-the-position-of-the-child-items-tab-in-the-content-view/
Kind Regards
David
This has been patched.
In the list view section there is a Display at tab Number option, just set it to the position you want the child tab to be at. i set it to -1 which will force it before any other tab.
is working on a reply...