Custom Fields
Re-Envisioned
Support MB Custom Table Custom Model - Admin table columns

  • Creator
    Topic
  • #30911
    Resolved wgstjf
    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #30919
    Long 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
    wgstjf
    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 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
    wgstjf
    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 Nguyen
    Moderator

    Hi,

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

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

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