And you could probably do a lot of funky stuff in that file using some ngIf directives, but I'm thinking that would be bad practice, since altering this file would mean I'd have to take special care of this file every time I do a minor Umbraco update.
What would be the most straightforward way of accomplishing this?
Is there any way of overruling the view file selection using some kind of package technique, perhaps a manifest file and some custom view files?
Maybe it would be a good idea to just fork the listview and make it a proper plugin. It's already a datatype so you can customize and re-use that on the document types on which you need it. The only problem might be that if you use it as a datatype, you'll still be able to expand the node tree.
Maybe we can build support into the core for a setting like "Hide expand button" on the datatype (sorry: Property Editor!). For now it would probably mean you'd have to do some javascript hacking.
I think I arrived at nearly the same conclusions, was mostly trying to check if I missed something obvious.
What I'm trying to do is add the contents of specific doc properties as columns in the list view. So maybe we should consider adding possibility of specifying which columns should be shown in the list view to the datatype editor for list views. Then you could have different list views for different doctypes, and the yes it would be nice if it was possible to specify that you wanted to hide expand button also.
@Sebastiaan: Do you think I should try and describe what I'm looking for, and create an issue for it on YouTrack?
It's in our plans to do this and make something like a provider for the list view. We just didn't want to start building those yet as it would've immediately made it too complex. So start with a good basis and then expand on it.
But yes, if you could spend 5 minutes adding that to the tracker that would be great, saves me some time, thanks! :-)
In the meantime, perhaps this could be a messy/hacky way of doing it?... would it be possible to check a variable (eg. the doc type) in javascript, and then show/hide listview td's depending on this value? I'm not very familiar with angular.js so I'm not sure what variables are accessible by javascript within the listview.html page?
In 7.2 is there a quick way to change/hack the source of the list view? For instance adding an additional tab with a listview that shows the children of a different node?
It was to simplify admin for client so related items could be managed on different tabs of a page.
I guess what I want is not the listview control as this hides items in the tree view. What I want is something just like the listview with all the same functionality (publish/create/delete/sort) but be able to specify a custom datasource.
I've already been told I need to create my own property editor for this. I guess I am just looking for the easiest way to do it without starting from scratch.
Do you have any tips or know of a project that implements something like this that I can have a look at?
Custom list views per doctype in Umbraco backend
Trying to come with an estimate on how much it would take to be able to customize the list view columns for a certain media type.
I found that it's fairly easy to customize the file that creates the list view which is found here
And you could probably do a lot of funky stuff in that file using some ngIf directives, but I'm thinking that would be bad practice, since altering this file would mean I'd have to take special care of this file every time I do a minor Umbraco update.
What would be the most straightforward way of accomplishing this?
Is there any way of overruling the view file selection using some kind of package technique, perhaps a manifest file and some custom view files?
Any ideas?
Regards Jesper Hauge
Maybe it would be a good idea to just fork the listview and make it a proper plugin. It's already a datatype so you can customize and re-use that on the document types on which you need it. The only problem might be that if you use it as a datatype, you'll still be able to expand the node tree.
Maybe we can build support into the core for a setting like "Hide expand button" on the datatype (sorry: Property Editor!). For now it would probably mean you'd have to do some javascript hacking.
I think I arrived at nearly the same conclusions, was mostly trying to check if I missed something obvious.
What I'm trying to do is add the contents of specific doc properties as columns in the list view. So maybe we should consider adding possibility of specifying which columns should be shown in the list view to the datatype editor for list views. Then you could have different list views for different doctypes, and the yes it would be nice if it was possible to specify that you wanted to hide expand button also.
@Sebastiaan: Do you think I should try and describe what I'm looking for, and create an issue for it on YouTrack?
It's in our plans to do this and make something like a provider for the list view. We just didn't want to start building those yet as it would've immediately made it too complex. So start with a good basis and then expand on it.
But yes, if you could spend 5 minutes adding that to the tracker that would be great, saves me some time, thanks! :-)
In the meantime, perhaps this could be a messy/hacky way of doing it?... would it be possible to check a variable (eg. the doc type) in javascript, and then show/hide listview td's depending on this value? I'm not very familiar with angular.js so I'm not sure what variables are accessible by javascript within the listview.html page?
Jesper, might you have an example you could share?
I found that the controller pulls in the docType and all properties so is easy to add in extra fields based on type (but hacky modifying core code)
~line:83 in the last TD of the TR that loops the pages
Just as a note, in Umbraco 7.2 you will be able to customize the fields of each listview you'd like to make, no need for hacking the core code. :)
In 7.2 is there a quick way to change/hack the source of the list view? For instance adding an additional tab with a listview that shows the children of a different node?
Yes, you should have buttons for that in the document type editor:
Oh, for displaying children of a different node?? That would be very confusing wouldn't it? Can you specify what the usecase for that would be?
It was to simplify admin for client so related items could be managed on different tabs of a page.
I guess what I want is not the listview control as this hides items in the tree view. What I want is something just like the listview with all the same functionality (publish/create/delete/sort) but be able to specify a custom datasource.
I've already been told I need to create my own property editor for this. I guess I am just looking for the easiest way to do it without starting from scratch.
Do you have any tips or know of a project that implements something like this that I can have a look at?
You could get some inspiration from the MemberListView package perhaps:
https://our.umbraco.org/projects/backoffice-extensions/memberlistview-for-umbraco-7
Source: https://github.com/robertjf/umbMemberListView
is working on a reply...