Jump to content

[SOLVED] How to hook on lister to display options values instead of titles?


PWaddict
 Share

Recommended Posts

Thanks for the hint @elabx

Your code makes ALL options fields available in the Lister columns to display the same values. Here is how I did it:

$wire->addHookAfter('FieldtypeOptions::markupValue', function($event) {

  if($this->process != 'ProcessPageLister') return;

  $field = $event->arguments(1);
  $value = $event->arguments(2);

  if($field == "my_options_field") {
    $event->return = $value->value;
  }

});

 

  • Like 1
Link to comment
Share on other sites

  • PWaddict changed the title to [SOLVED] How to hook on lister to display options values instead of titles?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...