2

What I am trying to do is adjust the entry index page to be more specific for our use case, I have already sorted out extra columns but I want to sort or filter by entry type. Of course I can already sort by typeId using modifyEntrySortableAttributes but this is not ideal.

I either want to be able to sort by an entry type's name using modifyEntrySortableAttributes or better still insert another filter button of all the types in-between the status filter and the search bar, see mock-up below.

enter image description here

Any help greatly appreciated!

5

I made a small plugin that nests Entry Types under their section in the sources list that might be good enough for what you're after:

https://gist.github.com/mdcpepper/548fd04939e040507960

|improve this answer|||||
  • Excellent thanks Mike - I'll take a look and get back to you! – Josh Angell Apr 14 '15 at 10:22
  • Great - this is doing enough for what I need, not quite the UI I was after but it does the job - thanks Mike :) – Josh Angell Apr 15 '15 at 7:32
1

The "All types" filter button would be sweet, but as far as I know, there's no way to implement that without hacking the CP w/ JS, as Craft doesn't expose any relevant hooks. I'd be a bit cautious with stuff like that, especially now with 3.0 on the horizon.

Shameless plug: The DashCols plugin (which I wrote) will let you display and sort on entry type. Alas – DashCols uses typeId for sorting, not the name like you want. Having the option to sort on the types' ID or name would be a cool feature, though – I'll try to get that in there some day and will update this answer if/when I do.

|improve this answer|||||
  • Yeah - I had the same issue with typeId, couldn't for the life of me work out how to sort by name. In the end I went with typeId but just made sure the order of the Entry Types was alphabetical... – Josh Angell Apr 15 '15 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.