Hi,

How can I specify the fields that are displayed in my bundle overview screen ? having only numbers being displayed is not very helpful for the users managing the content in the bundles.

Thanks!

CommentFileSizeAuthor
eck_problem.png15.76 KBdrupalpal
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pascalduez’s picture

Hi,
you might want to look at hook_entity_label(), so you can display some fields or properties from your custom entities, for instance if you added a title field to this entity bundle...

Toxid’s picture

I also wonder if there's some way to do this. I would like to sort on a custom property column that I've added. Also I would like other titles on the overview page than on the entity view page. So hook_entity_label won't work for me since it affect both. Is it possible to override or do a hook_alter the eck__entity__overview function?

fmizzell’s picture

Sorry it has taken me so long to respond. In alpha-3, everything is managed through a function called entity_table, or entities_table (something like that). Anyways, in this function there are two hooks, one to modify table rows, and one to modify the header of the table.. the entity gets passed to the hook implementors so you can get any data you want from the entity and display it. I have been hesitant to post this because the more I think about this problem the more I think that ECK should be using Views module to generate the entity overview (list) page. This would give us way more flexibility in terms of customization from the UI, and we could do more advanced things like sorting and filtering on our administration tables. What do you think about the views solution?

ydnar79’s picture

Just read over the issue and I personally feel that the views approach would be the best overall. It would allow for easy modification to the UI as well as reduce the amount of work required to improve/update/add new features to the module. (Since much of the UI would be taken care of elsewhere.)

Just my 2 cents....

fmizzell’s picture

Version: 7.x-1.1-alpha3 » 7.x-2.x-dev
Status: Active » Fixed

ECK also comes with a title behavior that can be attached to any property. The behavior causes for the property to become a label, and it will be display on the entity table.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

I stumbled about this topic during my research for the same problem. I agree views is the best solution, but until now I would like to know which hooks do you mean? I looked in the function entity_table($entities, $select = FALSE) but which hooks do you mean for extending the header and rows? Can you give me a hint?