Custom Model - Admin table columns

Support MB Custom Table Custom Model - Admin table columnsResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #30911
    wgstjfwgstjf
    Participant

    Hi all,

    Quick one - is there a way to add admin table columns for a Custom Modal that does not involve the use of MB Admin Columns?

    We are required by the client to limit the number of 3rd party plugins used in the project and also need to be able to dynamically control the content displayed in the column based on the field value.

    Thanks in advance,

    Will

    #30919
    Long NguyenLong Nguyen
    Moderator

    Hi Will,

    The new version of MB Admin Columns 1.6.0 supports showing admin columns for the custom fields in the custom model page. It will be included in the next release of MB AIO.

    #30922
    wgstjfwgstjf
    Participant

    Thanks Long but I am really looking to do this more at a code level than via another plugin. Are there any hooks that we can utilise to define the columns and their respective content?

    Cheers,

    Will

    #30933
    Long NguyenLong Nguyen
    Moderator

    Hi,

    It would be too complicated to create the admin columns for the custom models. If you are familiar with coding, you can find some filter hooks in the file
    wp-content/plugins/mb-admin-columns/src/Model.php

    Hope that helps.

    #31088
    wgstjfwgstjf
    Participant

    Long,

    Thanks for your suggestion that we talke a look at the Model.php file. Having done so we've managed to achieve 99% of what we need.

    One final issue remains...how can we change the Primary Column. MB Custom Table inserts the 'id' column and this has the row actions within in. We are looking to move these row actions to another column. We would usually have used the following filter 'list_table_primary_column' but this seems not to have an effect.

    Thanks,

    Will

    #31102
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Currently, it's not possible. I see you've created another topic about adding more filters to customize the models https://support.metabox.io/topic/custom-model-needs-additional-hooks-please/.

    I think that after the filters are added, you can modify the primary column as well.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.