Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Model table_headers - hook available for intercepting each row before displaying?

rl2rl2
edited October 2017 in News & Announcements
Hello,

I have a model in which I have successfully stripped back to show only selected columns, two of the columns are 'enum' with options of Yes and No. Their titles are 'Popular' and 'Helpful' I'd like to replace the text 'yes' and 'no' instead with an full star and an empty star as per font awesome (or similiar) - something more graphical.

Starred: <i class="fa fa-star" aria-hidden="true"></i>
Not starred: <i class="fa fa-star-o" aria-hidden="true"></i>

Is there a hook to enable me to do this?

Comments

  • edited 5:19AM
    There is a method on the Data_table class called "add_field_formatter" that is used in the Module controller, however, it's currently not exposed in a way for you to modify or hook into it without editing the source or overwriting the controller method.
Sign In or Register to comment.